Had it been written in Perl you would have the same problem. The first way around it would be to make a complex regex that checks to see if your substitution is taking place behind an open '<', however that is not going to be 100% effective ... really you should be using some kind of HTML parser and then use your regex when you know you have text. HTML::TokeParser is what I use in Perl... I unfortunatly had to roll my own for something similar in PHP so YMMV.
Lobster Aliens Are attacking the world!In reply to Re: Perl RegEx in PHP
by cfreak
in thread Perl RegEx in PHP
by YAFZ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |