- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
Detects HTML tags open and/or closed with and without whitespace or characters in between. Good for stripping all tags from a string.
<b> | </b> | <p><b>some text</b></p>
Author Rating: Not yet rated. Jonathan Crossland
Your Rating
Bad Good

Enter New Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Thankyou very much
Name: cb
Date: 11/14/2006 12:42:58 AM
Seems to work well enough. Will use it in a website search function.

Title: error
Name: jig
Date: 5/12/2004 10:14:13 AM
it also maches: [</b>my text<b>] ;-)

Title: Doesn't work!
Name: Glenn
Date: 4/9/2004 6:13:31 AM
As it is, it only matches the trailing '>' of an HTML string. e.g. Some <b>Bold</b> text yeilds: Some <bBold</b text It does seem overly complex as the 'standard' way of achieving the same thing is: (<[^>]+>) Still, that's proof that regexes are versatile and there's always more than one way to achieve the same ends!

Title: Here is an example
Name: Jonathan
Date: 10/3/2003 6:21:58 PM
you can see a small example at: I use it on a small web rss reader, to strip out tags and put them back. I needed to take them out when I called BabelFish translation service. I hope this helps. Jonathan

Title: not understanding expression
Name: nicolas
Date: 10/1/2003 5:30:30 AM
hello, could someone explain this expression to me. i don't understand it. thanks

Title: Try the non-HTML encoded RegExp
Name: MoGryph
Date: 7/29/2003 9:08:27 AM
Did you try the expression as it shows on this screen, where it is listed with ampersand gt colons, and ampersand lt colon, or, did you try the version with actual Less than and Greater than signs. I think this was entered in in the correct format, but that this web-site is displaying it incorrectly.

Title: don't work
Name: Chaz
Date: 7/23/2003 7:16:48 PM
Microsoft VBScript runtime error '800a1399' Syntax error in regular expression

Copyright © 2001-2018, | ASP.NET Tutorials