or thus <a href="url">url</a>
the problem is that in some cases the links are thus <a href="url">word!=url</a> if i find some <a href="url"> i replace it by the same but then of href=url> an image red or green depending if that work (the url), then if i search that are simplely wroten as i shown first may be that i find again the same url but between a tags and put again the image, and in this case would has two time the image, it would appear thus

http://url.someand i dont want thus, my regex is it
Code: Select all
$tutu=preg_replace_callback("/((<\s*a\s+[^>]*href\s*=\s*(((\"|'|`)".$value[0]."\\5)|(".$value[0]."))[^>]*>)|(".$value[0]."))/i","bot",$tutu);