function clickable($str) {
$str = ereg_replace("((f|ht){1}tp://[a-zA-Z0-9@:%.~#-\?&]+)", "<a href=\"\1\">\1</a>", $str);
$str = ereg_replace("([a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+.[a-zA-Z0-9.-]+)","<a href=\"mailto:\1\">\1</a>", $str);
return $str;
}
This function makes all words beginning with http:// or mailto: clickable.
My problem is that I want to add ] as valid char, how can I do this?
I've tried ] /] and all sorts of combinations... I can't figure it out!!
Heeelp me!