(?x) <(\w+)[^>]*>[^<]* # HTML tags that don't contain text |(?<=(<%@\s|<%\#\s|<%=\s))[^%]*(?=\s%>) # The contents of various other forms of Embedded source |(?<=<%\s)[^%]*(?=\s%>) # The contents of Embedded source |(?<=) # HTML Comments |\b[\w-]+\b(?=\s*=) # HTML Attribute name |\s\b[\w-]+\b=\"[^\"]*\" # HTML Attribute name value pair |(?<=\")[^\"\n<>]*(?=\") # HTML Compatible String Double |(?<=\')[^\'\n]*(?=\') # 'String Single' |(?<=\[)[^\[\]]*(?=\]) # [Square Brackets] |(?<={)[^{}]*(?=}) # {Curly Brackets} |(?<=[^/]>)[^><]*(?=Text Inside HTML Tag]*/> # Closed xHTML Tags |(?<=\")(?=(>|/>| />)) # Placer for adding HTML Attribute Values |<[^>]*> # HTML Tags |(?<=\")[^\"\n]*(?=\") # String Double # Thomas Aylott #