What's the purpose of matching "www.", "www1.", "www2." … "www999."? For purposes of this regex, wouldn't the domain matching that follows be sufficient?
http://daringfireball.net/misc/2010/07/url-matching-regex-te...
you can see he wants to match things like www.example.com, but not filename.txt
So www. can introduce a url also.