drew010 wrote:you could add a space to the beginning and end of that pattern, then it wont match things inside the bbcode tags. run that one first and then the bbcode ones second and it should work fine.
Stupid question but I am not really sure how to do this
I am confused by what alpha, almun mean... How would I go about adding a space to the front and end of this pattern?
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"<a href=\"\\0\">\\0</a>", $text);
Sorry for the dumb question.. I tried a couple things like
$text = ereg_replace(" [[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/] ",
"<a href=\"\\0\">\\0</a>", $text);
$text = ereg_replace("[ [:alpha:]]+://[^<>[:space:]]+[[:alnum:]/ ]",
"<a href=\"\\0\">\\0</a>", $text);
Neither seem to work but again I am not sure what I am doing... lol