Perfect Regular Expression for a pair of HTML





0
Date Submitted Sat. Mar. 6th, 2010 9:13 PM
Revision 1 of 1
Scripter Cloudgen
Tags Expression | HTML | pair | Regular
Comments 0 comments
This is the perfect regular expression for extracting a pair of html tags. For details, please seeThe regular expression for selecting a pair of HTML tag

<\s*(\w+)(?:[^>"']|"(?:\\"|[^"])*"|'(?:\\'|[^'])*')*>(([\s\S](?!<\s*\/$1>))*[\s\S])<\s*\/\s*$1>
 

Comments

There are currently no comments for this snippet.

Voting

Votes Up


Scripter Cloudgen

Votes Down


Beginner longkaty