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: 70 regular expressions found.

Change page:   |    Displaying page 1 of 4 pages; Items 1 to 20
Title Test Details Pattern Title
Expression
^(?=[^&])(?:(?<scheme>[^:/?#]+):)?(?://(?<authority>[^/?#]*))?(?<path>[^?#]*)(?:\?(?<query>[^#]*))?(?:#(?<fragment>.*))?
Description
Use it for breaking-down a URI (URL, URN) reference into its main components: Scheme, Authority, Path, Query and Fragment. This is not a simple match regular expression. so it not works to verify a URI. It returns 1 matching group for each URI component. For example, for the following URI: http://regexlib.com/REDetails.aspx?regexp_id=x#Details returns: scheme=&quot;http&quot;, authority=&quot;regexlib.com&quot;, path=&quot;/REDetails.aspx&quot;, query=&quot;regexp_id=x&quot; and fragment=&quot;Details&quot;. This is a W3C raccomandation (RFC 2396).
Matches
http://regexlib.com/REDetails.aspx?regexp_id=x#Details
Non-Matches
&
Author Rating: Not yet rated. Frederico Knabben
Title Test Details RFC (Mexican Code)
Expression
^[A-Za-z]{3,4}[0-9]{6}$
Description
Mexican RFC code without Homonimia or separators
Matches
aBC999999 | RESL720319 | rerl000123
Non-Matches
abc-999999 | abc 999999 | ABCD 999999
Author Rating: Not yet rated. Jose Luis Reyes
Title Test Details RFC Homonimia (Mexican Code)
Expression
^[0-9a-zA-z]{3}$
Description
Mexican RFC Homonimia Code
Matches
999 | aaa | Z1D
Non-Matches
ABCD | AB | AB12
Author Rating: Not yet rated. Jose Luis Reyes
Title Test Details Pattern Title
Expression
(?:(?:http|https)://(?:(?:[^/&=()/§, ]*?)*\.)+(?:\w{2,3})+?)(?:/+[^ ?,'§$&()={\[\]}]*)*(?:\?+.*)?$
Description
I don't give a f*** to the RFC, fix it yourself for RFC, I just need a valid webresource location. So add forbidden characters as you need them in the character classes or use it as it is. This RegEx is not for searching valid URLs, just for validating. Look at the trailing $.
Matches
http://www.test.org | http://www.test.org/page1 | http://www.test.org/folder/subfolder/page.html?get
Non-Matches
http://www.test.org% | http://www.test.org/hgh(s/ | http://www.test.org/hehe/notallowed&/page1.h
Author Rating: The rating for this expression. Lars Echterhoff
Title Test Details IPv6 addresses including compressed and IPv4-embedded variants (RFC 2373)
Expression
(::|(([a-fA-F0-9]{1,4}):){7}(([a-fA-F0-9]{1,4}))|(:(:([a-fA-F0-9]{1,4})){1,6})|((([a-fA-F0-9]{1,4}):){1,6}:)|((([a-fA-F0-9]{1,4}):)(:([a-fA-F0-9]{1,4})){1,6})|((([a-fA-F0-9]{1,4}):){2}(:([a-fA-F0-9]{1,4})){1,5})|((([a-fA-F0-9]{1,4}):){3}(:([a-fA-F0-9]{1,4})){1,4})|((([a-fA-F0-9]{1,4}):){4}(:([a-fA-F0-9]{1,4})){1,3})|((([a-fA-F0-9]{1,4}):){5}(:([a-fA-F0-9]{1,4})){1,2}))
Description
This RE recognizes IPv6 addresses for all the representations described by RFC 2373: 1) extended format (with both upper and lowercase HEX) 2) compressed format (eg 2001::6:a) 3) IPv4-embedded format (eg ::ffff:1.2.3.4) limited to addresses of the traditional dual-stack configuration Resulting from observation of real-world implementations, case 2) is extended to allow "::" for one 0-group alone. Although the RFC is clear on "::" being for "multiple groups of 16-bits of zeros" only, some tools like "dig" for the mac produce those values. The RE is simple and quite elegant; it has been tested on over 300 IPv6 addresses collected by dig-ing IPv6-enabled domains; it is used in sshguard's log parser, see http://www.sshguard.net .
Matches
2001:470:b0b4:1:280:c6ff:fef2:9410 | 2001:868:100::3 | 2001:888:144a::a441:888:1002 | ::1 | a:b:: | ::FFFF:1.2.3.4
Non-Matches
1:2:3:4:5:6:7:8:9 | a::b::c | x:x:x:x:x:x:x:x
Author Rating: Not yet rated. mij
Title Test Details Pattern Title
Expression
^[A-Za-z]{4}[ |\-]{0,1}[0-9]{6}[ |\-]{0,1}[0-9A-Za-z]{3}$
Description
Regular expression that matches Mexican RFC's (Registro Federal de Contribuyentes).
Matches
LOZG7802117B9 | LOZG-780211-7B9 | LOZG780211-7B9
Non-Matches
LO-ZG-78-02-11-7B9
Author Rating: The rating for this expression. Gerardo Lopez
Title Test Details Pattern Title
Expression
^[A-Za-z]{3,4}[ |\-]{0,1}[0-9]{6}[ |\-]{0,1}[0-9A-Za-z]{3}$
Description
This Regex matches Mexican RFC's (Registro Federal de Contribuyentes) with 3 or 4 letters in the first section. It accepts spaces and dashes between sections.
Matches
LOZG7502123T7 | LOZG-750212-3T7 | LOZ 750212 3T7
Non-Matches
LOZG750212
Author Rating: Not yet rated. Gerardo Lopez
Title Test Details Email validation
Expression
^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.(af|ax|al|dz|as|ad|ao|ai|aq|ag|ar|am|aw|au|at|az|bs|bh|bd|bb|by|be|bz|bj|bm|bt|bo|ba|bw|bv|br|io|bn|bg|bf|bi|kh|cm|ca|cv|ky|cf|td|cl|cn|cx|cc|co|km|cg|cd|ck|cr|ci|hr|cu|cy|cz|dk|dj|dm|do|ec|eg|sv|gq|er|ee|et|fk|fo|fj|fi|fr|gf|pf|tf|ga|gm|ge|de|gh|gi|gr|gl|gd|gp|gu|gt| gg|gn|gw|gy|ht|hm|va|hn|hk|hu|is|in|id|ir|iq|ie|im|il|it|jm|jp|je|jo|kz|ke|ki|kp|kr|kw|kg|la|lv|lb|ls|lr|ly|li|lt|lu|mo|mk|mg|mw|my|mv|ml|mt|mh|mq|mr|mu|yt|mx|fm|md|mc|mn|ms|ma|mz|mm|na|nr|np|nl|an|nc|nz|ni|ne|ng|nu|nf|mp|no|om|pk|pw|ps|pa|pg|py|pe|ph|pn|pl|pt|pr|qa|re|ro|ru|rw|sh|kn|lc|pm|vc|ws|sm|st|sa|sn|cs|sc|sl|sg|sk|si|sb|so|za|gs|es|lk|sd|sr|sj|sz|se|ch|sy|tw|tj|tz|th|tl|tg|tk|to|tt|tn|tr|tm|tc|tv|ug|ua|ae|gb|us|um|uy|uz|vu|ve|vn|vg|vi|wf|eh|ye|zm|zw|com|edu|gov|int|mil|net|org|biz|info|name|pro|aero|coop|museum|arpa))|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$
Description
This is a robust email validation: the username part conforms with RFC 2822 (for instance, emails with tags ("+") are validated). The host part is checked for valid subdomains and its TLD is checked against all the 243 countries codes and the 14 ICANN'sTLDs. The host part also accepts IP with or without brackets.
Matches
Non-Matches
Author Rating: The rating for this expression. Philippe Benthien
Title Test Details Pattern Title
Expression
^(?:(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|\x5c(?=[@,"\[\]\x5c\x00-\x20\x7f-\xff]))(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|(?<=\x5c)[@,"\[\]\x5c\x00-\x20\x7f-\xff]|\x5c(?=[@,"\[\]\x5c\x00-\x20\x7f-\xff])|\.(?=[^\.])){1,62}(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|(?<=\x5c)[@,"\[\]\x5c\x00-\x20\x7f-\xff])|"(?:[^"]|(?<=\x5c)"){1,62}")@(?:(?:[a-z0-9][a-z0-9-]{1,61}[a-z0-9]\.?)+\.[a-z]{2,6}|\[(?:[0-1]?\d?\d|2[0-4]\d|25[0-5])(?:\.(?:[0-1]?\d?\d|2[0-4]\d|25[0-5])){3}\])$
Description
just another email validation perl regexp. I tryed to follow as much as possible the RFC 3696 don't hesitate to report.
Matches
!def!xyz'[email protected] | Fred\ [email protected] | "test"@tsse.com
Non-Matches
[email protected] | [email protected] | .test@ex-am_ple.com
Author Rating: Not yet rated. jonathan gotti
Title Test Details Powerful email address validator with support for multiple subdomains and IP Addresses. (RFC 5322-5321)
Expression
^([\!#\$%&'\*\+/\=?\^`\{\|\}~a-zA-Z0-9_-]+[\.]?)+[\!#\$%&'\*\+/\=?\^`\{\|\}~a-zA-Z0-9_-]+@{1}((([0-9A-Za-z_-]+)([\.]{1}[0-9A-Za-z_-]+)*\.{1}([A-Za-z]){1,6})|(([0-9]{1,3}[\.]{1}){3}([0-9]{1,3}){1}))$
Description
The following is a powerful regular expression for e-mail address's validation. It was wrote respecting the e-mail addresses' syntax reported in the RFCs and supports both hostnames with multiple sub domains and IP addresses.
Matches
Non-Matches
Author Rating: The rating for this expression. Salvatore Fresta
Title Test Details Pattern Title
Expression
^([A-Z|a-z|&amp;]{3}\d{2}((0[1-9]|1[012])(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])(29|30)|(0[13578]|1[02])31)|([02468][048]|[13579][26])0229)(\w{2})([A|a|0-9]{1})$|^([A-Z|a-z]{4}\d{2}((0[1-9]|1[012])(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])(29|30)|(0[13578]|1[02])31)|([02468][048]|[13579][26])0229)((\w{2})([A|a|0-9]{1})){0,3}$
Description
Registro Federal de Contribuyentes (RFC) , used in Mexico as a unique set of caracters for a person or corporation registration . Registro Federal de Contribuyentes utilizado en Mexico para el registro en hacienda.
Matches
ABCD790419 | ABC790419aa1 | ABCD790419AB1
Non-Matches
AB790419 | A12790419 | ABC791332
Author Rating: The rating for this expression. Leo Hinojosa
Title Test Details RFC Mexico
Expression
^([A-ZÑ\x26]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$
Description
RFC Registro Federal de Contribuyentes en Mexico para el SAT
Matches
AAA051231AAA
Non-Matches
AAA051335AAA
Author Rating: Not yet rated. InvoiceOne.com.mx
Title Test Details RFC SAT
Expression
^([A-ZÑ\x26]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$
Description
RFC SAT Registro Federal de Contribuyentes en Mexico para el SAT
Matches
AAA051231AAA
Non-Matches
AAA051335AAA
Author Rating: Not yet rated. InvoiceOne.com.mx
Title Test Details Simple RFC Mexican
Expression
^[A-ZÑ&]{3,4}\d{6}(?:[A-Z\d]{3})?$
Description
A simple mexican RFC format check.
Matches
XAXX010101000
Non-Matches
XA010101000
Author Rating: Not yet rated. Asere Ware
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
[email protected]|six."Hello\ There"@yahoo.com|[email protected]|Most any valid e-mail
Non-Matches
Don't know any
Author Rating: The rating for this expression. Matthew
Title Test Details Pattern Title
Expression
^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$
Description
Checks domain names. This validates domains based on latest specifications (RFCs 952 and 1123 dealing with hostnames and RFC 1035 dealing with domain name system requirements) except that it only includes realistic fully-qualified domains: 1. requires at least one subdomain 2. allows shortest top-level domains like &quot;ca&quot;, and &quot;museum&quot; as longest. Other validation rules: 1. Labels/parts should be seperated by period. 2. Each label/part has maximum of 63 characters. 3. First and last character of label must be alphanumeric, other characters alphanumeric or hyphen. 4. Does not check maxlength of domain which incidentally is 253 characters of text (255 binary representation). For a regular expression that matches ALL domains: ^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?$
Matches
regexlib.com | this.is.a.museum | 3com.com
Non-Matches
notadomain-.com | helloworld.c | .oops.org
Author Rating: The rating for this expression. Remi Sabourin
Title Test Details Pattern Title
Expression
urn:[a-z0-9]{1}[a-z0-9\-]{1,31}:[a-z0-9_,:=@;!'%/#\(\)\+\-\.\$\*\?]+
Description
Matches canonical Uniform Resource Names (URNs) as defined in RFC 2141.
Matches
urn:vrml:umel:/some/dir/file.ext | urn:schemas-microsoft-com:xml-data | URN:foo:a123,456
Non-Matches
urn:11111.345:12 | http://www.example.org/ | urn:a#-12:555
Author Rating: The rating for this expression. Mark Ayers
Title Test Details URI Validation & Extraction
Expression
^((http|https|ftp):\/\/)?((.*?):(.*?)@)?([a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])((\.[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])*)(:([0-9]{1,5}))?((\/.*?)(\?(.*?))?(\#(.*))?)?$
Description
Validates and extracts URI components. Protocol is optional. Username & Password is optional. Host regex was taken from Remi Sabourin and follows RFC1035 except that it allows hostnames greater than 253 chars. Also TLD length is not restriced. Port number is optional. Absolute Path is optional, and also extracts the optional querystring and optional anchor reference.
Matches
http://john:@www.domain.com:8080/index.html?param=value#Page1
Non-Matches
http://www.domain.com:/ | www-.domain.com
Author Rating: Not yet rated. John Bayly
Title Test Details Pattern Title
Expression
^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$
Description
Matches full and compressed IPv6 addresses as defined in RFC 2373 (http://www.faqs.org/rfcs/rfc2373.html). No useful captures. Various implementations require different terminators. (i.e. ^-$ or \b-\b)
Matches
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 | 1080::8:800:200C:417A | ::FFFF:129.144.52.38
Non-Matches
FEDC::7654:3210::BA98:7654:3210 | FEDC:BA98:7654:3210 | ::
Author Rating: The rating for this expression. Jeff Johnston
Title Test Details Pattern Title
Expression
^([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}$
Description
IPv6 text representation of addresses without compression from RFC 1884. This regular expression doesn't allow IPv6 compression (&quot;::&quot;) or mixed IPv4 addresses.
Matches
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 | 1080:0:0:0:8:800:200C:417A | 0:0:0:0:0:0:0:1
Non-Matches
128.0.0.1 | FEDC:BA98:7654:3210:FEDC:BA98:7654:3210:AA31 | ::1
Author Rating: Not yet rated. Mikko Puonti
Change page:   |    Displaying page 1 of 4 pages; Items 1 to 20

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