| Title |
Test
Find
URL
|
| Expression |
^(http(?:s)?\:\/\/[a-zA-Z0-9]+(?:(?:\.|\-)[a-zA-Z0-9]+)+(?:\:\d+)?(?:\/[\w\-]+)*(?:\/?|\/\w+\.[a-zA-Z]{2,7}(?:\?[\w]+\=[\w\-]+)?)?(?:\&[\w]+\=[\w\-]+)*)$ |
| Description |
A simple but powerful URL validating regex. Accepts multiple sub-domains and sub-directories. Even accepts query strings ande ports! Accepts HTTP or HTTPS. Also accepts optional "/" on end of address. This may be the mother of all URL regexes. It's much more stricter than most others that do far less. |
| Matches |
http://website.com | http://subdomain.web-site.com/cgi-bin/perl.cgi?key1=value1&key2=value2 |
| Non-Matches |
http://website.com/perl.cgi?key= | http://web-site.com/cgi-bin/perl.cgi?key1=value1&key2 |
| Author |
Rating:
Not yet rated.
Ted Cambron
|
| Source |
|
| Your Rating |
|