Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Filtering All HTML tags and hyperlinks

Last post 10-30-2009, 11:17 AM by mash. 1 replies.
Sort Posts: Previous Next
  •  10-30-2009, 6:36 AM 57056

    Filtering All HTML tags and hyperlinks

    Hi,
    I'm trying to build an expression which could catch all HTML tags and hyperlinks except bold, italic, underline, subscript and superscript and obviously space.
    Does anyone know how can I do it.

    Thanks in advance.
    Rizwan

  •  10-30-2009, 11:17 AM 57058 in reply to 57056

    Re: Filtering All HTML tags and hyperlinks

    This regex http://regexlib.com/REDetails.aspx?regexp_id=523 will find all HTML elements.

    You can try to modify the pattern and remove the elements you want to keep for your task from the pattern. Since you didn't follow our posting guidelines I'll leave the modifications up to you, the regex given was written for the .Net regex engine.  If you are using a different platform you'll need to make the appropriate adjustments.

    Your question is a little confusing as hypherlinks are created by tags just as everything else in HTML is so I'm not sure why the distinction is made.  And space is not a HTML element so I don't know what that has to do with your task.

     


    Michael

    "In theory, theory and practice are the same. In practice, they are not."
    Albert Einstein
View as RSS news feed in XML