Originally posted by Mega
$string = 'Hi my name is john and I am very old see my webpage [url]http://www.jkcool.com.[/url] [url]http://wjhwuhwuhw.com,:[/url]';
$string = preg_replace('#([url]http://[/url]|[url]ftp://[/url]|[url]https://[/url])([^\s]+[a-zA-Z0-9])#i', '<a href="\\1\\2">\\1\\2</a>', $string);
echo $string;
[/B]
o for gods sake vbulletin is so shit, why the hell does ne1 use it when it doesnt even work.
$string = 'Hi my name is john and I am very old see my webpage [url]http://www.jkcool.com.[/url] [url]http://wjhwuhwuhw.com,:[/url]';
$string = preg_replace('#([url]http://[/url]|[url]ftp://[/url]|[url]https://[/url])([^\\s]+[a-zA-Z0-9])#i', '<a href="\\\\1\\\\2">\\\\1\\\\2</a>', $string);
echo $string;
sorry if this comes out wrong too, i duno how to solve it, vbulletin sucks