RegEx: Match Any Tag

Dave Wanta was looking for assistance in RegexAdvice to match any <p> tags in a string.  The answer was supplied by Yasatuka Ito:

</??p(\s[^>]*?)?>

Of course, p in the expression can be replaced by any tag, or replaced with pipe-delimited tag names in square brackets to match multiple tags: [img|p|b|i|u|ul|li|a]

 

Print | posted on Wednesday, May 18, 2005 8:09 PM

Feedback

No comments posted yet.
Title  
Name
Email (never displayed)
Url
Comments   
Please add 6 and 4 and type the answer here: