There are problems I've seen with using Regex strings and expecting them to work in all cases on all Regex engines which is why I tend to stick with PCRE ~ http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Express... a point in favour of the Gruber example.
"... The pattern is also liberal about Unicode glyphs within the URL ..."
There are problems I've seen with using Regex strings and expecting them to work in all cases on all Regex engines which is why I tend to stick with PCRE ~ http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Express... a point in favour of the Gruber example.
"... The pattern is also liberal about Unicode glyphs within the URL ..."
PCRE supports Unicode but it's not switched on by default ~ http://www.pcre.org/pcre.txt