- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
This expression finds all opening and closing tags. Good for stripping out tags in an XML or HTML document. I used it to clean-up HTML documents that had XML mixed in. It found all the tags, then I just deleted the ones that weren't standard. I used it in HOMESITES extended find.
<html> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | <
Any plain old text | | xml>
Author Rating: The rating for this expression. X Man
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: test
Name: test test test
Date: 3/25/2007 9:19:24 PM
i don't know what thie

Title: Just what I was looking for
Name: Jay Bevins
Date: 1/7/2005 6:47:39 AM
It took a long time of web searching to find a simple solution. True it does not work in all cases of HTML, but does work on analyzing HTML the table I am working on. Thanks a lot.

Title: hh
Name: mm
Date: 11/7/2004 10:36:11 AM
<font> eeh?

Title: RE: Does not work properly
Name: Toby Henderson
Date: 6/9/2004 5:21:40 AM
This one will match all the tags including <tag tag="<tag>"> or javascript in any of the attributtes

Title: Does not work properly
Name: Chris Heller
Date: 2/18/2004 8:55:51 PM
This will catch tags like this <a href="some URL">, but not like <a title="Next >" href="some URL">. In general parsing HTML and XML with regular expressions does not work in all cases. It will work in a lot of cases, but not all. In the poster's use case where he is editing documents in Homesite, then it would probably work well enough since he is going to see what it catches, but if you were doing this automatically in some program, you'd have problems.

Copyright © 2001-2019, | ASP.NET Tutorials