Hi!
I have this:
$text = eregi_replace("($suchwort)","<span class=\"suchwort\"><b>\1</b></span>", $text);
This works to highlight a keyword in a text-query. but the problem is, that there are sometimes links or some other stuff in the text which should not be changed!
For example, I have the Keyword "gmx" but I dont want to replace it in an URL (beginning with "http://") and I dont want to replace it, if it stands between brackets (like "[...]" or "<...>").
How can I use regex to skip these things?
Thx a lot!