That's because you're using the ereg function, not the preg_match. They're different types of regular expressions. What I gave you was Perl Compatible, so you need to use preg_match. If you want to use ereg, you'd need this expression.
[url]http://[/url][a-zA-Z0-9.-]+.[a-zA-Z]{2,5}
Not much different for something like this, except that it doesn't have the delimiters on the start and end.
I would suggest using preg_match, as it's more efficient.