regular expression help
Posted: Thu Oct 09, 2003 5:22 pm
I'm trying to modify the following bit of code:
eregi_replace("((ht|f)tp://)((([a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))|(([0-9]{1,3}\.){3}([0-9]{1,3})))((/|\?)[a-z0-9~#%&'_\+=:\?\.-]*)*)", "<a href=\"\\0\" target=\"_blank\">\\0</a>", $text);
What I'd like is to have the above code ignore any url that begins with "url=" OR "]" (without the quotes of course). Everything else should be parsed as normal.
Does anyone know how to do this?
Thanks.
eregi_replace("((ht|f)tp://)((([a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))|(([0-9]{1,3}\.){3}([0-9]{1,3})))((/|\?)[a-z0-9~#%&'_\+=:\?\.-]*)*)", "<a href=\"\\0\" target=\"_blank\">\\0</a>", $text);
What I'd like is to have the above code ignore any url that begins with "url=" OR "]" (without the quotes of course). Everything else should be parsed as normal.
Does anyone know how to do this?
Thanks.