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

Change page:   |    Displaying page 1 of 6 pages; Items 1 to 20
Title Test Details Pattern Title
Expression
^[2-9]\d{2}-\d{3}-\d{4}$
Description
This expression matches a hyphen separated US phone number, of the form ANN-NNN-NNNN, where A is between 2 and 9 and N is between 0 and 9.
Matches
800-555-5555 | 333-444-5555 | 212-666-1234
Non-Matches
000-000-0000 | 123-456-7890 | 2126661234
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$
Description
This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9.
Matches
44240 | 44240-5555 | G3H 6A3
Non-Matches
Ohio | abc | g3h6a3
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$
Description
Matches US phone number format. 1 in the beginning is optional, area code is required, spaces or dashes can be used as optional divider between number groups. Also alphanumeric format is allowed after area code.
Matches
1-(123)-123-1234 | 123 123 1234 | 1-800-ALPHNUM
Non-Matches
1.123.123.1234 | (123)-1234-123 | 123-1234
Author Rating: The rating for this expression. Igor Kravtsov
Title Test Details Pattern Title
Expression
((\(\d{3}\)?)|(\d{3}))([\s-./]?)(\d{3})([\s-./]?)(\d{4})
Description
US Phone number that accept a dot, a space, a dash, a forward slash, between the numbers. Will Accept a 1 or 0 in front. Area Code not necessary
Matches
1.2123644567 | 0-234.567/8912 | 1-(212)-123 4567
Non-Matches
0-212364345 | 1212-364,4321 | 0212\345/6789
Author Rating: Not yet rated. Mart Maasikas
Title Test Details Pattern Title
Expression
[0-9]{4}\s*[a-zA-Z]{2}
Description
Dutch zip code expression 4 numbers - space yes/no - 2 letters
Matches
1054 WD | 1054WD | 1054 wd
Non-Matches
10543
Author Rating: Not yet rated. Roland Mensenkamp
Title Test Details Pattern Title
Expression
(^1300\d{6}$)|(^1800|1900|1902\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\d{4}$)|(^04\d{2,3}\d{6}$)
Description
Australian phone numbers: Matches all known formats incl normal 10-digit landline numbers (valid area code mandatory) 13, 1300, 1800, 1900, 1902 plus mobile 10 and 11-digit formats. Use a Replace function first to remove non-numerics which are probably separators (E.g. newNum = number.replace(/[\D]/g, ""). Please contact me if you find any valid Aussie numbers being rejected.
Matches
0732105432 | 1300333444 | 131313
Non-Matches
32105432 | 13000456
Author Rating: The rating for this expression. Bill Hely
Title Test Details Pattern Title
Expression
^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$
Description
This is a modification of the zip code regular expression submitted by Steven Smith (ssmith@aspalliance.com) It no longer matches 78754-12aA
Matches
78754 | 78754-1234 | G3H 6A3
Non-Matches
78754-12aA | 7875A | g3h6a3
Author Rating: Not yet rated. Khoi Pham
Title Test Details Pattern Title
Expression
^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$
Description
This regular expression can be used to validate UK postcodes. Especially useful if want to provide a client side validation on a web site.
Matches
SW112LE | SW11 2LE | CR05LE
Non-Matches
12CR0LE | 12CR 0LE | SWLE05
Author Rating: Not yet rated. Santosh Potadar
Title Test Details Pattern Title
Expression
^(1?(-?\d{3})-?)?(\d{3})(-?\d{4})$
Description
US Telephone Reg expression that allows 7, 10 or 11 digits with or without hyphens.
Matches
15615552323 | 1-561-555-1212 | 5613333
Non-Matches
1-555-5555 | 15553333 | 0-561-555-1212
Author Rating: Not yet rated. jay gann
Title Test Details Pattern Title
Expression
^[\\(]{0,1}([0-9]){3}[\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$
Description
US Telephone Number where this is regular expression excludes the first number, after the area code,from being 0 or 1; it also allows an extension to be added where it does not have to be prefixed by 'x'.
Matches
(910)456-7890 | (910)456-8970 x12 | (910)456-8970 1211
Non-Matches
(910) 156-7890 | (910) 056-7890 | (910) 556-7890 x
Author Rating: The rating for this expression. Bill Anderson
Title Test Details Pattern Title
Expression
^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$
Description
This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9.
Matches
44240 | 44240-5555 | T2P 3C7
Non-Matches
44240ddd | t44240-55 | t2p3c7
Author Rating: The rating for this expression. Qing Jiang
Title Test Details Pattern Title
Expression
^0(6[045679][0469]){1}(\-)?(1)?[^0\D]{1}\d{6}$
Description
Validates Austrian Cellular Phone Numbers. Works with ONE, T-Mobile, A1, Telering and new Provider "Drei". WITHOUT Country Code Verification.
Matches
0664-1234567 | 06641234567 | 0699-11234567
Non-Matches
06991-1234567 | +43650-1234567 | 07661234567
Author Rating: Not yet rated. Stefan Beylen
Title Test Details Pattern Title
Expression
^[1-9][0-9]{3}\s?[a-zA-Z]{2}$
Description
Validates Dutch Postal Codes (ZipCode). There was a previous one listed here, but it's not entirely correct. Namely that dutch postal codes can contain a zero but cannot start with one, so this one is the adjusted version.
Matches
1234AB | 1234 AB | 1001 AB
Non-Matches
0123AB | 1234A B | 0123 AB
Author Rating: Not yet rated. Jos Krause
Title Test Details Pattern Title
Expression
^[a-zA-Z0-9ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿ\.\,\-\/\']+[a-zA-Z0-9ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿ\.\,\-\/\' ]+$
Description
This simple regexp should match any possible italian address entry and doesn't match NULL entries (good if address is required). Should work well for any other address (it's been verified against 250 addresses from most european countries, usa and australia. Please mail me if there's something missing
Matches
v.le dell'industria 45/a | via genova 45-3-d | p.zza Garibaldi, 48
Non-Matches
[NULL]
Author Rating: Not yet rated. paolo beltrami
Title Test Details Pattern Title
Expression
^((AL)|(AK)|(AS)|(AZ)|(AR)|(CA)|(CO)|(CT)|(DE)|(DC)|(FM)|(FL)|(GA)|(GU)|(HI)|(ID)|(IL)|(IN)|(IA)|(KS)|(KY)|(LA)|(ME)|(MH)|(MD)|(MA)|(MI)|(MN)|(MS)|(MO)|(MT)|(NE)|(NV)|(NH)|(NJ)|(NM)|(NY)|(NC)|(ND)|(MP)|(OH)|(OK)|(OR)|(PW)|(PA)|(PR)|(RI)|(SC)|(SD)|(TN)|(TX)|(UT)|(VT)|(VI)|(VA)|(WA)|(WV)|(WI)|(WY))$
Description
This validates the states and territories of the United States in a 2 character uppercase format. Very poor excuse for a regular expression! ;) Written by Jason Gaylord.
Matches
NY | PA | NJ
Non-Matches
Pennsylvania | Pa | pa
Author Rating: Not yet rated. Jason N. Gaylord
Title Test Details Pattern Title
Expression
^([\(]{1}[0-9]{3}[\)]{1}[ ]{1}[0-9]{3}[\-]{1}[0-9]{4})$
Description
It is the exact phone number regular expression for '(###) ###-####'. Written by Jason Gaylord.
Matches
(555) 555-1212
Non-Matches
555-1212 | 1-800-555-1212 | 555-555-1212
Author Rating: The rating for this expression. Jason N. Gaylord
Title Test Details Pattern Title
Expression
^[1-9]{1}[0-9]{3}\s{0,1}?[a-zA-Z]{2}$
Description
Used for dutch postalcodes; no leading zero. 4 numbers and 2 letters.
Matches
1234AB | 1234 AB | 1234 ab
Non-Matches
0123AB | 123AA
Author Rating: Not yet rated. Michiel Lankamp
Title Test Details Pattern Title
Expression
^([\(]{1}[0-9]{3}[\)]{1}[\.| |\-]{0,1}|^[0-9]{3}[\.|\-| ]?)?[0-9]{3}(\.|\-| )?[0-9]{4}$
Description
More permissive than others on the site, this one allows you to let a user enter US phone numbers in the way they most commonly use, without letting them enter non-valid combinations.
Matches
5551212 | 614555-1212 | (614)555-1212
Non-Matches
A12-5555 | (614-555-1212 | 555*1212
Author Rating: Not yet rated. Jeff Gabriel
Title Test Details Pattern Title
Expression
^((\d{5}-\d{4})|(\d{5})|([AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\d[A-Za-z]\s?\d[A-Za-z]\d))$
Description
Regular expression for US (ZIP and ZIP+4) and Canadian postal codes. It allows 5 digits for the first US postal code and requires that the +4, if it exists, is four digits long. Canadain postal codes can contain a space and take form of A1A 1A1. The letters can be upper or lower case, but the first letter must be one of the standard Canadian zones: A,B,C,E,G,H,J,K,L,M,N,P,R,S,T,V,X,Y.
Matches
00501 | 84118-3423 | n3a 3B7
Non-Matches
501-342 | 123324 | Q4B 5C5
Author Rating: Not yet rated. Matthew Aznoe
Title Test Details Pattern Title
Expression
\d{1,3}.?\d{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}
Description
Street Address. While far from perfect it validates street addresses reasonably. Created with absolutely no experience using a cool tool downloaded from http://www.codeproject.com/dotnet/expresso.asp?target=e%20xpresso
Matches
2\34 Wodonga Ave | 54a Beechworth Rd | 47/675 WODONGA DRIVE
Non-Matches
aaa Beechworth Rd | 65 Beechworth Rd | 65 Beechworth/ Rd
Author Rating: Not yet rated. adam willding
Change page:   |    Displaying page 1 of 6 pages; Items 1 to 20

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