Title |
Test
Find
XML Tag
|
Expression |
<(\w+)(\s(\w*=".*?")?)*((/>)|((/*?)>.*?</\1>)) |
Description |
This RE will match XML tag elements. All elements must be closed. Won't match nested tags
|
Matches |
<body> text<br/>More Text </body> | <a href="link.html">Link</a |
Non-Matches |
<p> Some Text <p> | <hr> | <html> |
Author |
Rating:
Michael Ash
|
Source |
|
Your Rating |
|
Title: holy grail
Name: Cameron Knowlton
Date: 9/11/2004 4:44:16 PM
Comment:
wow, this is the holy grail of web page parsing... a blessing on your camels.
Title: Update
Name: Michael Ash
Date: 12/20/2003 10:28:22 PM
Comment:
I changed this regex from <(\w+?).*?(/>|>.*?</\1>)
The orginal version would incorrectly match when tags contained
a self closing tag.
This version should fix that error