$text = preg_replace("/\[url=(\W?)(.*?)(\W?)\](.*?)\[\/url\]/", '<a href="$2">$4</a>', $text);
works great if they do it like
[url=http://www.somesite.com[Click here&[/url]but if they just do
[url]http://www.somesite.com[/url]it doesn't work.
any clue what I need to do to fix it? Or should I go about it another way?