Please don't even think about using this for XML.
It is not the question if you get hit, only when and how hard you gonna hurt yourself.
Really, honestly: Don't do that.
Update: See Why a regex *really* isn't good enough for HTML and XML, even for "simple" tasks
Greetings,
-jo
In reply to Re^3: can u suggest a regex for this ?
by jo37
in thread can u suggest a regex for this ?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |