It's not a complete parser, but a list of canned regex's doing what he asked for.
It's a list of canned regex's doing something similar to what he asked for. XML and HTML syntaxes are different.
The OP could derive the HTML equivalents from them, but it's moot since he expressed a desire to not use CPAN.
In reply to Re^4: Conditional regex
by ikegami
in thread Conditional regex
by sherab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |