You can try this regexp:
\[url=([^\s\]]+)\s*\](.*(?=\[\/url\]))\[\/url\]
So, in JavaScript you can use something like this:
text = text.replace(/\[url=([^\s\]]+)\s*\](.*(?=\[\/url\]))\[\/url\]/g, '<a href="$1">$2</a>')
If you'd like to parse the short format
[url]http://ya.ru[/url]
which must transform to
<a href="http://ya.ru">http://ya.ru</a>
You'll need the following regexp:
\[url\](.*(?=\[\/url\]))\[\/url\]
And the corresponding JavaScript:
text = text.replace(/\[url\](.*(?=\[\/url\]))\[\/url\]/g, '<a href="$1">$1</a>')