2011.03.08 | mucho
private function ReplaceURL(str:String):String { var p:RegExp = new RegExp("(https?|ftp)(://[[:alnum:]\+\$\;\?\.%,!#~*/:@&=_-]+)", "gi"); var r:String = "<a href=\"$1$2\" target=\"_blank\">$1$2</a>"; return str.replace(p, r); }