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

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 59 regular expressions found.

Change page:   |    Displaying page 1 of 3 pages; Items 1 to 20
Title Test Details Pattern Title
Expression
^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$
Description
RegExp for validating the format of IP Addresses. This works great with the ASP.NET RegularExpressionValidator server control.
Matches
127.0.0.1 | 255.255.255.0 | 192.168.0.1
Non-Matches
1200.5.4.3 | abc.def.ghi.jkl | 255.foo.bar.1
Author Rating: The rating for this expression. G. Andrew Duthie
Title Test Details Pattern Title
Expression
^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$
Description
Matches e-mail addresses, including some of the newer top-level-domain extensions, such as info, museum, name, etc. Also allows for emails tied directly to IP addresses.
Matches
example@example.com | foo@bar.info | blah@127.0.0.1
Non-Matches
broken@@example.com | foo@bar.infp | blah@.nospam.biz
Author Rating: The rating for this expression. David Huyck
Title Test Details Pattern Title
Expression
^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$
Description
This matches an IP address, putting each number in its own group that can be retrieved by number. If you do not care about capturing the numbers, then you can make this shorter by putting everything after ^ until immediately after the first \. in a group ( ) with a {3} after it. Then put the number matching regex in once more. It only permits numbers in the range 0-255.
Matches
0.0.0.0 | 255.255.255.02 | 192.168.0.136
Non-Matches
256.1.3.4 | 023.44.33.22 | 10.57.98.23.
Author Rating: Not yet rated. Andrew Polshaw
Title Test Details Pattern Title
Expression
^(((((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])-(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9]))|((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9]))),)*)(((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-
Description
Matches comma-separated list of IP address and IP ranges. E.g. 192.168.101.1-192.168.101.255,192.168.102.12
Matches
192.168.101.1 | 192.168.101.1-192.168.101.255 | 192.168.101.1-192.168.101.255,192.168.102.12
Non-Matches
999.168.101.1 | 192.168.101.1- | -192.168.101.255
Author Rating: The rating for this expression. Gregory Entin
Title Test Details Pattern Title
Expression
^(([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+))$
Description
Matches simple IP addresses. It's not too complex or long, but it does the job if you want something short/simple.
Matches
113.173.40.255 | 171.132.248.57 | 79.93.28.178
Non-Matches
189.57.135 | 14.190.193999 | A.N.D.233
Author Rating: Not yet rated. Jag fire
Title Test Details Pattern Title
Expression
^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$
Description
Email address validator. Should cover most of RFC 822, including unusual (but still valid) addresses. Does not restrict the top level domain size, but you're better off doing an nslookup or similar if you absolutely must have a valid domain. Accepts IP Addresses instead of the domain, with or without brackets. Believe it or not, this one is valid: !#$%^&*-+~/'`|{}@xyz.com Sorry looks like this site is mangling the quote and ampersand characters - you'll have to fix that yourself.
Matches
/A/Wacky/User@weirdos.com | bob.builder@[1.1.1.1] | "blah b. blahburger"@blah.com
Non-Matches
./A/Wacky/User@weirdos.com | bob.builder@[256.1.1.1] | -"blah b. blahburger"@blah.com
Author Rating: Not yet rated. Roger Ramjet
Title Test Details Pattern Title
Expression
[0-9A-Fa-f]{2}(\.?)[0-9A-Fa-f]{2}(\.?)[0-9A-Fa-f]{2}(\.?)[0-9A-Fa-f]{2}
Description
matches IP address in hex form in dotted or not dotted notation
Matches
c0.a8.01.64 | 0A0275C4 | aC.10.1F.b1
Non-Matches
192.168.1.1 | 10.2.177.4 | ah.10.1f.20
Author Rating: Not yet rated. David Tersigni
Title Test Details Pattern Title
Expression
[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}
Description
Very Simple Match for dotted Decimal IP address. Doesn’t Validate addresses
Matches
192.168.1.1 | 10.2.234.1 | 66.129.71.122
Non-Matches
192.168.1 | 10.2.1234.1 | 66 129 71 122
Author Rating: The rating for this expression. David Tersigni
Title Test Details Pattern Title
Expression
^(?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)(?(?=\.?\d)\.)){4}$
Description
Regular expression for validating a decimal IP address. Matches 4 groups of from 1 to 3 digits, where each group of digits ranges from 0 to 255 in value. Groups of digits must be separated by a single period (.) with no other formatting characters present. Uses conditional regex with lookahead syntax to prevent a match on a period following the final group of digits.
Matches
217.6.9.89 | 0.0.0.0 | 255.255.255.255
Non-Matches
256.0.0.0 | 0127.3 | 217.6.9.89.
Author Rating: Not yet rated. Jerry Schmersahl
Title Test Details Pattern Title
Expression
^((ht|f)tp(s?))\://([0-9a-zA-Z\-]+\.)+[a-zA-Z]{2,6}(\:[0-9]+)?(/\S*)?$
Description
Simple URL Validator -- allows http, https, ftp, ftps, 2-6 letter TLD, ports, any path. Sorry, no IP addresses. Not too fussy, but then, it's not too long either ;-)
Matches
http://www.site.com | https://www.secure.com:10000 | ftp://ftp.site.com/pub/files/
Non-Matches
www.site.com | https://www.site.longtld | ftp:/badformat.com
Author Rating: The rating for this expression. Luke Arms
Title Test Details Pattern Title
Expression
^(((ht|f)tp(s?))\://)?((([a-zA-Z0-9_\-]{2,}\.)+[a-zA-Z]{2,})|((?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)(?(\.?\d)\.)){4}))(:[a-zA-Z0-9]+)?(/[a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~]*)?$
Description
Hopefully an all-encompassing expression to validate a URL. Supports an optional protocol, either a domain or IP address, an optional port number and an optional path.
Matches
this.com | https://this.com:8080/this/this.htm | ftp://255.255.255.255/
Non-Matches
.this.com | https://this.com:/ | ftps://255.256.255.255/
Author Rating: The rating for this expression. Tom Hartland
Title Test Details Pattern Title
Expression
^(([_\w-+!#$%&'*/=?^`{}|~]+(\.[_\w-+!#$%&'*/=?^`{}|~]+)*)|("([ _\w-+!#$%&'*/=?^`{}|~]+(\.[ _\w-+!#$%&'*/=?^`{}|~]+)*)"))@[\w-]{1,63}(\\.[\w-]{1,63})*(\.[_\w-]{2,6})$
Description
Attempt to validate email addresses. Does not support name <host@domain.com> format or ip addresses
Matches
fred&barney@stonehenge.com | "fred smith"@domain.com | sam@domain.com
Non-Matches
rudy@asdfasdf-asdfasdf-asdfasdf-asdfasdf-asdfasdf-asdfasdf-asdfasdf-asdfasdf-asdfasdf-.com | bad\ema
Author Rating: Not yet rated. Keith Hawes
Title Test Details Pattern Title
Expression
^((([a-zA-Z]:)|(\\{2}\w+)|(\\{2}(?:(?:25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)(?(?=\.?\d)\.)){4}))(\\(\w[\w ]*)))
Description
Regex to match valid folder paths. can be local, UNC with server name, or UNC with IP address
Matches
c:\ds\dsfsdf | \\192.168.14.118\23423 | \\fsdf\23423
Non-Matches
c:\ | \\192.168.12.114 | \\fff
Author Rating: The rating for this expression. John Conwell
Title Test Details URL
Expression
^((([hH][tT][tT][pP][sS]?|[fF][tT][pP])\:\/\/)?([\w\.\-]+(\:[\w\.\&%\$\-]+)*@)?((([^\s\(\)\<\>\\\"\.\[\]\,@;:]+)(\.[^\s\(\)\<\>\\\"\.\[\]\,@;:]+)*(\.[a-zA-Z]{2,4}))|((([01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}([01]?\d{1,2}|2[0-4]\d|25[0-5])))(\b\:(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)\b)?((\/[^\/][\w\.\,\?\'\\\/\+&%\$#\=~_\-@]*)*[^\.\,\?\"\'\(\)\[\]!;<>{}\s\x7F-\xFF])?)$
Description
Matches a URL string by: protocol,subdomain,domain,ip address,port number,path and/or filename
Matches
http://regexlib.com | https://regexlib.com:80 | 66.129.120.94/Search.aspx
Non-Matches
http:/regexlib.com | https://regexlib.com:65536 | 66.129.120.256/Search.aspx.
Author Rating: Not yet rated. Dean Dal Bozzo
Title Test Details Accurate IP address verification
Expression
((0|1[0-9]{0,2}|2[0-9]?|2[0-4][0-9]|25[0-5]|[3-9][0-9]?)\.){3}(0|1[0-9]{0,2}|2[0-9]?|2[0-4][0-9]|25[0-5]|[3-9][0-9]?)
Description
Accurate IP address verification... Each numeric part of an IP address must be between 0 and 255. All patterns I have seen on the net cover this range but they allow leading zeros. The valid cases are: * 0 * 1, 10-19 and 100-199 aka 1[0-9]{0,2} * 2 and 20-29 aka 2[0-9]? * 200-249 aka 2[0-4][0-9] * 250-255 aka 25[0-5] * 3-9 and 30-99 aka [3-9][0-9]?
Matches
10.0.0.0 | 195.167.1.119 | 255.255.255.255
Non-Matches
010.0.0.0 | 195.167.01.119 | 256.20.55.23
Author Rating: The rating for this expression. Vassilis Petroulias
Title Test Details E-Mail Address by RFC2822 and RFC1035
Expression
^([A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\}\|\~]+|"([\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|\\[\x0-\x7F])*")(\.([A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\}\|\~]+|"([\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|\\[\x0-\x7F])*"))*@([A-Za-z0-9]([A-Za-z0-9\-]*[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9\-]*[A-Za-z0-9])?)*|(1[0-9]{0,2}|2([0-4][0-9]?|5[0-4]?|[6-9])?|[3-9][0-9]?)(\.(0|1[0-9]{0,2}|2([0-4][0-9]?|5[0-5]?|[6-9])?|[3-9][0-9]?)){2}\.(1[0-9]{0,2}|2([0-4][0-9]?|5[0-4]?|[6-9])?|[3-9][0-9]?))$
Description
This will match any valid RFC2822 e-mail address typed into web forms. If does not support comments, display name, or line folding. It does support quoted-strings in the local-part and domains by the RFC 1035 and proper ip addresses. It does relax the RFC1035 rule of not allowing numbers as the first character of a domain name (since they do exist in real life)
Matches
six@yahoo.com|six."Hello\ There"@yahoo.com|six@192.168.0.1|Most any valid e-mail
Non-Matches
Don't know any
Author Rating: The rating for this expression. Matthew
Title Test Details Dotted Quad (Decimal)
Expression
^(([1-9]?\d|1\d\d|2[0-4]\d|25[0-5]).){3}([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])$
Description
Regex for IP Address validation.
Matches
0.0.0.0 255.255.255.255 192.168.1.1
Non-Matches
02.168.1.1 1234.123.123.123 256.1.1.1
Author Rating: The rating for this expression. John Patton
Title Test Details Almost RFC2822 Compliant Email Address Check
Expression
^(?:(?#local-part)(?#quoted)"[^\"]*"|(?#non-quoted)[a-z0-9&+_-](?:\.?[a-z0-9&+_-]+)*)@(?:(?#domain)(?#domain-name)[a-z0-9](?:[a-z0-9-]*[a-z0-9])*(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])*)*|(?#ip)(\[)?(?:[01]?\d?\d|2[0-4]\d|25[0-5])(?:\.(?:[01]?\d?\d|2[0-4]\d|25[0-5])){3}(?(1)\]|))$
Description
Validates an RFC 2822 email address, except does not allow most punctuation and non-ascii alphanumeric characters. Also does not take length requirements into account. Allows domain name and IP addresses, but ensures that the IP address entered is valid.
Matches
user@domain.com|user@127.0.0.1|user@[127.0.0.1]|user.id@domain-name.extension|"user"@domain.com
Non-Matches
userdomain.com|user@300.0.0.1|user@[127.0.0.1|.user@-domain-.com|user@"domain.com"
Author Rating: The rating for this expression. Daniel
Title Test Details IP validator
Expression
/^(?:(?:1\d?\d|[1-9]?\d|2[0-4]\d|25[0-5])\.){3}(?:1\d?\d|[1-9]?\d|2[0-4]\d|25[0-5])$/
Description
It matches an IP address only in the correct format. There was a previous regex send which matches 192.168.01.2 but this code won't match preceeding 0's
Matches
192.168.1.2 | 127.0.0.1
Non-Matches
192.168.01.2 | 1921.68.1.2
Author Rating: The rating for this expression. snabbi
Title Test Details Email - RFC 3696
Expression
^[a-z0-9!$'*+\-_]+(\.[a-z0-9!$'*+\-_]+)*@([a-z0-9]+(-+[a-z0-9]+)*\.)+([a-z]{2}|aero|arpa|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|travel)$
Description
Checks email format against RFC 3696 (http://tools.ietf.org/html/rfc3696). Allows all characters described in Sections 2 and 3 of the RFC EXCEPT those described in Section 4.3 as unsafe for mailto URLs without encoding. Allows any 2-letter TLD plus any of the current gTLDs as listed at http://www.icann.org/registries/top-level-domains.htm. Does not accept quoted strings in the local part or IP addresses in lieu of the domain name. Does not enforce length limits. Intended to be used as case-insensitive. Comments are appreciated!
Matches
bob@smith.com | bob.j@j.smith.museum | !$'*+-_@a--1.ca
Non-Matches
.bob@smith.com | bob..j@smith.com | bob@-smith.com
Author Rating: Not yet rated. David Thompson
Change page:   |    Displaying page 1 of 3 pages; Items 1 to 20

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