Tuesday, March 18, 2008

How to get HTML tag with regex?

Regex this is the best one!

<*/?\w+((\s+\w+(\s*=\s*(?:".*?"'.*?'[^'">\s]+))?)+\s*\s*)/?>

please ignore the * at the <*