<?
$pattern2 = '#\[url2\s*=\s*(\w+://[^\]]+)\](.+?)\[/url2]#';
$replacement2 = '<a href="\1" target="_BLANK" class=\"user\">\2</a>';
$pattern = '#\[url\s*=\s*(\w+://[^\]]+)\](.+?)\[/url]#';
$replacement = '<a href="\1" class=\"user\">\2</a>';
$string = preg_replace($pattern,$replacement,$string);
$string = preg_replace($pattern2,$replacement2,$string);
?>
what i basically want to know is why this doesnt work if i entered
email[/url]
*without the space between url