Please support RegExLib Sponsors
.NET Engine Client-side Engine Silverlight Tester
Source Regular Expression # one tag name matcher and three times the style or attribute matcher with each 6 match possibilities (three times to reckon with the attributes placing) # capturing (only one) front space of each attribute # quotes aren't needed to match, but are captures when available < (span|font) # tagname .*? (?: (?: (\s?style="?).*? # style opener ((?:\s?font-size:.+?\s*(?:;|,|(?="))+)|(?:\s?color:.+?\s*(?:;|,|(?="))+))[^"]* # font-size or color style property ((?:\s?font-size:.+?\s*(?:;|,|(?="))+)|(?:\s?color:.+?\s*(?:;|,|(?="))+))[^"]* # font-size or color style property # (the line above should be made optional.) ("?) # style end quote if available | (\s?size="?.*?(?:(?=\s)|"|(?=>))) # size attribute | (\s?color="?.*?(?:(?=\s)|"|(?=>))) # color attribute | (?=>) ) .*? ){3} >
Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials