/ Published in: Regular Expression

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
</?[A-Za-z]+[^>]*>[A-Za-z]+</?[A-Za-z]+[^>]*> Finds <tag>Word</tag> </?[A-Za-z]+[^>]*>[A-Za-z/ ]+</?[A-Za-z]+[^>]*> Finds <tag>Words with spaces</tag> OLD AND BUSTED:(</?[A-Za-z]+[^>]*>)([.:_?/=A-Za-z/ ]+</?)([A-Za-z]+[^>]*>) (<[^>]+>)((?:[a-z].*?[a-z]+))(<[^>]+>) Finds <tag>Words with spaces, periods, colons, ?marks and = signs</tag> They are grouped as $1, $2, $3
Comments
