RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 8
Title Test Details Ultimate URL Match Expression
Expression
^(?:(?:http|https|ftp|telnet|gopher|ms\-help|file|notes)://)?(?:(?:[a-z][\w~%!&',;=\-\.$\(\)\*\+]*):.*@)?(?:(?:[a-z0-9][\w\-]*[a-z0-9]*\.)*(?:(?:(?:(?:[a-z0-9][\w\-]*[a-z0-9]*)(?:\.[a-z0-9]+)?)|(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))(?::[0-9]+)?))?(?:(?:(?:/(?:[\w`~!$=;\-\+\.\^\(\)\|\{\}\[\]]|(?:%\d\d))+)*/(?:[\w`~!$=;\-\+\.\^\(\)\|\{\}\[\]]|(?:%\d\d))*)(?:\?[^#]+)?(?:#[a-z0-9]\w*)?)?$
Description
I think this is the ultimate url match expression to every possible url pattern including named or ip address domain PS: you have got to try RegexBuddy it's a very cool tool that helps realy http://www.regexbuddy.com
Matches
http://username:[email protected]:5000/test?q=2121ddf&opt=blah#ttg | http://www.test.com/test.htm#ttg | domain.com/?q=test | http://localhost/test | http://127.0.0.1/test | 127.0.0.1 | [email protected]
Non-Matches
[test] | opt=blah#ttg | /path?q=test
Author Rating: The rating for this expression. ASM™
Title Test Details E-mail address
Expression
^(?:mailto:)?(?:[a-z][\w~%!&',;=\-\.$\(\)\*\+]*)@(?:[a-z0-9][\w\-]*[a-z0-9]*\.)*(?:(?:(?:[a-z0-9][\w\-]*[a-z0-9]*)(?:\.[a-z0-9]+)?)|(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$
Description
I think this is a very good e-mail validation match expression PS: you have got to try RegexBuddy it's a very cool tool that helps realy http://www.regexbuddy.com
Matches
mailto:[email protected] | [email protected] | user%[email protected] | admin@localhost
Non-Matches
@172.168.0.1 | domain.com | user%[email protected]/test
Author Rating: Not yet rated. ASM™
Title Test Details User Name and Password
Expression
^(?<username>[a-z][\w.-]*)(?::(?<pwd>[\w.-]*))$
Description
accepts: 1. user name - starting with a letter - [a-z, 0-9, _, - ]* 2. : delimiter 3. password with any characters
Matches
user:anything4654sASD:454!@#$ | user-name:anything4654sASD:454!@#$ | user.name:anything4654sASD:454!@#$
Non-Matches
user name:anything4654sASD:454!@#$ | username | user!name:anything4654sASD454
Author Rating: Not yet rated. ASM™
Title Test Details Domain Name or IP
Expression
^(?:[a-z0-9][\w\-]*[a-z0-9]*\.)*(?:(?:(?:[a-z0-9][\w\-]*[a-z0-9]*)(?:\.[a-z0-9]+)?)|(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$
Description
accepts - Domain name - or ip address
Matches
domain | domain.local | domain124.local | 190.200.1.12
Non-Matches
user@domain | test.domain.local | domain124_.local | localhost:3000
Author Rating: The rating for this expression. ASM™
Title Test Details URL Path
Expression
^(?:(?:\.\./)|/)?(?:\w(?:[\w`~!$=;\-\+\.\^\(\)\|\{\}\[\]]|(?:%\d\d))*\w?)?(?:/\w(?:[\w`~!$=;\-\+\.\^\(\)\|\{\}\[\]]|(?:%\d\d))*\w?)*(?:\?[^#]+)?(?:#[a-z0-9]\w*)?$
Description
parse/match url path with: 1. optional relative path 2. optional query string 3. optional fragments
Matches
..//test/tesf | /cgi-bin/version.pl?r=fhjkjh%20ds&djj=fffsd#kit | index.html | /?q=test
Non-Matches
.path./index.html | about:blank | ..///test/tesf
Author Rating: Not yet rated. ASM™
Title Test Details HTML Color
Expression
^#[\dA-Fa-f]{3}(?:[\dA-Fa-f]{3}[\dA-Fa-f]{0,2})?$
Description
matches # + 3 hex numbers + optional 3 more hex numbers and 2 more hex numbers for alpha PS: you have got to try RegexBuddy it's a very cool tool that helps realy http://www.regexbuddy.com
Matches
#fff | #123456 | #12345678 | #1f35cc
Non-Matches
#1234 | #0 | #123456789
Author Rating: Not yet rated. ASM™
Title Test Details URL Capture
Expression
^(?<scheme>(?:http|https|ftp|telnet|gopher|ms\-help|file|notes)://)?(?:(?<user>[a-z][\w~%!&amp;',;=\-\.$\(\)\*\+]*):(?<password>.*)?@)?(?:(?<domain>(?:[a-z0-9]\w*[a-z0-9]*\.)*(?:(?:(?:[a-z0-9]\w*[a-z0-9]*)(?:\.[a-z0-9]+)?)|(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))))(?::(?<port>[0-9]+))?)?(?:(?<path>(?:/(?:[\w`~!$=;\-\+\.\^\(\)\|\{\}\[\]]|(?:%\d\d))+)*/(?:[\w`~!$=;\-\+\.\^\(\)\|\{\}\[\]]|(?:%\d\d))*)(?<params>\?[^#]+)?(?<fragment>#[a-z0-9]\w*)?)?$
Description
break apart all possible elements of a url to every possible url part
Matches
http://username:[email protected]:5000/test?q=2121ddf&opt=blah#ttg | http://127.0.0.1/path/to/?q=45 | telnet://192.0.2.16:80/ | /index.html
Non-Matches
[email protected] | ../index.html | cgi-bin/version.pl
Author Rating: Not yet rated. ASM™
Title Test Details XML/XSD URL
Expression
((http|https|ftp|telnet|gopher|ms\-help|file|notes)://)?(([a-z][\w~%!&amp;',;=\-\.$\(\)\*\+]*)(:.*)?@)?(([a-z0-9][\w\-]*[a-z0-9]*\.)*(((([a-z0-9][\w\-]*[a-z0-9]*)(\.[a-z0-9]+)?)|(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))(:[0-9]+)?))?(((/([\w`~!$=;\-\+\.\^\(\)\|\{\}\[\]]|(%\d\d))+)*/([\w`~!$=;\-\+\.\^\(\)\|\{\}\[\]]|(%\d\d))*)(\?[^#]+)?(#[a-z0-9]\w*)?)?
Description
I think this is the ultimate url match expression to every possible url pattern including named or ip address domain PS: you have got to try RegexBuddy it's a very cool tool that helps realy http://www.regexbuddy.com
Matches
http://username:[email protected]:5000/test?q=2121ddf&opt=blah#ttg | http://localhost/path/to/file-test.hml?q=45 | /index.html | index.html | http://127.0.0.1/path/to/?q=45
Non-Matches
[email protected] | httpss://test.com | about:blank | urn:oasis:names:specification
Author Rating: Not yet rated. ASM™
   Displaying page 1 of 1 pages; Items 1 to 8

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials