Return to Snippet

Revision: 18254
at September 24, 2009 14:51 by remotezygote


Initial Code
^(http[s]?|ftp):\/?\/?((([^\.:\/\s]*\.?)*)\.([^\.:\/\s]+\.[^\.:\/\s]+)):?([0-9]+)?([\/\w\.+]*\/?)?\??([\w\-\.]+[^#?\s]+)?\??[^#]*#?([\w\-]+)?$

Initial URL

                                

Initial Description
Matches are as follows:

0 = protocol
1 = fqdn
2 = subdomain
3 = top level subdomain
4 = domain (blah.com)
5 = port
6 = path
7 = query string
8 = hash

Initial Title
Actually useful URL parsing RegEx

Initial Tags
regex, url

Initial Language
Regular Expression