Quote:
Originally Posted by dontpanic
NTLDR,
Good point. I am having the same problems with str_replace() as I did with preg_replace() when we talked last. I have to figure out a way to prevent the replacement from occuring in existing <a> and [URL] instances as the replacement will break them and some times create interesting output as well.
|
Its posible to tell it to look for one thing but not another, its allong the lines of:
PHP Code:
$var = preg_replace('/(tofind)^(<a href="\S">tofind</a>)/i', 'replacement', $var);
Now I'm certain the above,
won't work , however its along those lines