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

Please support RegExLib Sponsors

Sponsors

Browse Expressions by Category

104 regular expressions found in this category!

Expressions in category: Address/Phone

Change page:   |    Displaying page 3 of 6 pages; Items 41 to 60
Title Test Details Pattern Title
Expression
(^(?!0{5})(\d{5})(?!-?0{4})(-?\d{4})?$)
Description
Javascript matches US zipcodes not allowing all zeros in first 5 or +4
Matches
12345 | 12345-6789 | 123456789
Non-Matches
12345-0000 | 00000-0000 | 00000
Author Rating: Not yet rated. Justin Elsberry
Title Test Details Pattern Title
Expression
^((\d[-. ]?)?((\(\d{3}\))|\d{3}))?[-. ]?\d{3}[-. ]?\d{4}$
Description
This is a pretty flexable phone number validator for US numbers. Allows optional country code and area code. Allows separation of numbers with " ", "-", "." or nothing to seperate. Area codes can be in parenthesis or not. Validates that you'll get 7, 10, or 11 digits in the way the most number of people option when writing them.
Matches
1(555)444-3333 | 202.555.3333 | 555-4444
Non-Matches
555-222-33334 | 1(303)5a4-5555 | 1 202) 111-3333
Author Rating: Not yet rated. Josh Aversa
Title Test Details Pattern Title
Expression
^([0-9]{2})?((\([0-9]{2})\)|[0-9]{2})?([0-9]{3}|[0-9]{4})(\-)?[0-9]{4}$
Description
A simple expression to brazilian phone number code modified expression of Rafael, beyond international code, simple DDI without "+" 99 plus simple DDD (99) plus simple and whitout parentheses em trace, local phone number 3 or 4 digits plus "-" plus 4 digits.
Matches
552123236699 | 212323-6699 | 2323-6699
Non-Matches
[3434-3432] | [4(23)232-3232] | [55(2)232-232]
Author Rating: Not yet rated. wallace dos santos damiao
Title Test Details Pattern Title
Expression
^((([A-PR-UWYZ])([0-9][0-9A-HJKS-UW]?))|(([A-PR-UWYZ][A-HK-Y])([0-9][0-9ABEHMNPRV-Y]?))\s{0,2}(([0-9])([ABD-HJLNP-UW-Z])([ABD-HJLNP-UW-Z])))|(((GI)(R))\s{0,2}((0)(A)(A)))$
Description
Validates UK postcodes and aligns in parenthesized subpatterns according to standard UK postcode elements. Validation is according to guidelines outlined at http://www.govtalk.gov.uk/gdsc/html/noframes/PostCode-2-1-Release.htm Postcode elements are separated according to description at http://www.graticule.com/data/uk/pcdata.html Expression is not thoroughly tested, but seems to be doing ok so far! Comments and improvements welcome.
Matches
GIR 0AA | SW1Y 1AA | AB1 4BL
Non-Matches
XVJ P09 | GB7Z 1HQ | Q1 1AA
Author Rating: Not yet rated. Christopher Townson
Title Test Details Pattern Title
Expression
^[1-9]{1}[0-9]{3}\s?[A-Z]{2}$
Description
Postcode for the Netherlands
Matches
1234AB | 1234 AB
Non-Matches
123BBB | 023AB
Author Rating: Not yet rated. de kleine Gerardus
Title Test Details Pattern Title
Expression
^(?:\([2-9]\d{2}\)\ ?|(?:[2-9]\d{2}\-))[2-9]\d{2}\-\d{4}$
Description
This US phone number edit with restricted format options: Accepts optional parens on area code with or without following space, and dashes between area code, central office code and station code. Formats include only (222) 555-1212 (with or without a space) and 222-555-1212. Conforms to NANP A-digit and D-digit requirements (ANN-DNN-NNNN). Area Codes 001-199 are not permitted; Central Office Codes 001-199 are not permitted.
Matches
(234) 555-1212 | (234)555-1212 | 234-555-1212
Non-Matches
(234)5551212 | 234 555 1212 | 234) 555-1212
Author Rating: Not yet rated. Don Johnston
Title Test Details Pattern Title
Expression
^[0-9]{5}$
Description
Matches german standard postal codes named 'Postleitzahl'
Matches
03242 | 36260 | 12394
Non-Matches
3520 | 102 | 100202
Author Rating: Not yet rated. Kevin Wennemuth
Title Test Details Pattern Title
Expression
(^(p[\s|\.|,]*| ^post[\s|\.]*)(o[\s|\.|,]*| office[\s|\.]*))| (^box[.|\s]*\d+)
Description
This expression filters all variations of Post Office Box or PO Box.
Matches
PO Box | p.o. box | box 123
Non-Matches
123 Some Street
Author Rating: Not yet rated. Joseph Lamb
Title Test Details Pattern Title
Expression
[0-9]{4}[A-Z]{2}
Description
Match for dutch zipcodes. Dutch zipcodes are always in the format of 4 digits and 2 letters.
Matches
1000AB | 3035KA | 9999ZZ
Non-Matches
AA1000 | Z1000 | 1000-CC
Author Rating: Not yet rated. marrik
Title Test Details Pattern Title
Expression
^(\d{3}-\d{3}-\d{4})*$
Description
This expression is a very simplex expression that allows null values or 3 digits, dash, 3 digits, dash, 4 digits. It validates a basic US phone number. Written by Jason N. Gaylord.
Matches
555-555-1212 | 123-456-7890
Non-Matches
555.555.1212 | (555) 555-1212 | 5555551212
Author Rating: Not yet rated. Jason N. Gaylord
Title Test Details Pattern Title
Expression
^(\d{2}-\d{2})*$
Description
This expression is a simplex expression that checks to see if a value is a valid phone system terminal number. It allows a null value or 2 digits, dash, 2 digits. Written by Jason N. Gaylord.
Matches
00-00 | 54-68
Non-Matches
1235 | 0 | 5-789
Author Rating: Not yet rated. Jason N. Gaylord
Title Test Details Pattern Title
Expression
^\s*((?:(?:\d+(?:\x20+\w+\.?)+(?:(?:\x20+STREET|ST|DRIVE|DR|AVENUE|AVE|ROAD|RD|LOOP|COURT|CT|CIRCLE|LANE|LN|BOULEVARD|BLVD)\.?)?)|(?:(?:P\.\x20?O\.|P\x20?O)\x20*Box\x20+\d+)|(?:General\x20+Delivery)|(?:C[\\\/]O\x20+(?:\w+\x20*)+))\,?\x20*(?:(?:(?:APT|BLDG|DEPT|FL|HNGR|LOT|PIER|RM|S(?:LIP|PC|T(?:E|OP))|TRLR|UNIT|\x23)\.?\x20*(?:[a-zA-Z0-9\-]+))|(?:BSMT|FRNT|LBBY|LOWR|OFC|PH|REAR|SIDE|UPPR))?)\,?\s+((?:(?:\d+(?:\x20+\w+\.?)+(?:(?:\x20+STREET|ST|DRIVE|DR|AVENUE|AVE|ROAD|RD|LOOP|COURT|CT|CIRCLE|LANE|LN|BOULEVARD|BLVD)\.?)?)|(?:(?:P\.\x20?O\.|P\x20?O)\x20*Box\x20+\d+)|(?:General\x20+Delivery)|(?:C[\\\/]O\x20+(?:\w+\x20*)+))\,?\x20*(?:(?:(?:APT|BLDG|DEPT|FL|HNGR|LOT|PIER|RM|S(?:LIP|PC|T(?:E|OP))|TRLR|UNIT|\x23)\.?\x20*(?:[a-zA-Z0-9\-]+))|(?:BSMT|FRNT|LBBY|LOWR|OFC|PH|REAR|SIDE|UPPR))?)?\,?\s+((?:[A-Za-z]+\x20*)+)\,\s+(A[LKSZRAP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])\s+(\d+(?:-\d+)?)\s*$
Description
Based on a regular expression from Michael Ash, this captures US street addresses and mailing addresses, single or multi-line (multi-line is more reliable), and breaks them into discrete parts for address line 1 and 2, city, state, and postal code. This expression is not perfect - with the interpreter I am using, some addresses refuse to match correctly. It should however work for most addresses, particularly when lines are delimited with carriage returns, tabs, or some other whitespace line delimiter that is not a space (\x20). Note: For improved compatibility, this expression does not use named groups. **Output** \1 = Address 1, \2 = Address 2, \3 = City, \4 = State, \5 = Postal Code
Matches
P.O. Box 42 Huslia, AK 99746 | C/O John Paul, POBox 456, Motown, CA 96090
Non-Matches
4321 East 40th Apt #3 Anchorage AK 99504 | Stockton, CA 95215
Author Rating: Not yet rated. Ross Hammer
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
(^0.*[1-9]*)|(^860+)|(^8613)|(\D)|([0-9])
Description
forbidden tele numbers when it starts with 0, 860+,8613,character or has any SBC case. you can also use it to any international phone dialed by E1 ,etc . this regex has been tested by java, perl,.net PS: the last regex [0-9]is in SBC case
Matches
0234568 | 8601063971622 | 1-221555
Non-Matches
861063971622
Author Rating: Not yet rated. qi gao
Title Test Details Pattern Title
Expression
(077|078|079)\s?\d{2}\s?\d{6}
Description
Validates UK mobile phone numbers. Valid formats are `077', `078' or `079' followed by another 8 digits, with an optional space after the dialling code and/or between the 4th and 5th characters of the remainder of the number. These formats are taken from the official guidelines from Ofcom, the organisation responsible for UK telecoms issues. Brackets are not valid and STD code must be entered.
Matches
07713 345678 | 078 12345678 | 079 12345678
Non-Matches
02344 123456 | 0121 292929 | 012345 6789
Author Rating: Not yet rated. John Chivers
Title Test Details Pattern Title
Expression
^\({0,1}0(2|3|7|8)\){0,1}(\ |-){0,1}[0-9]{4}(\ |-){0,1}[0-9]{4}$
Description
Expression to parse Australian landline telephone numbers. Will only accept valid STD codes. Allows for brackets around the STD code and either spaces or dashes between number groups.
Matches
(02) 9323 1234 | 0293231234 | 02-9323-1234
Non-Matches
01 9323 1234 | 02 932 123 | 02/9323/1234
Author Rating: Not yet rated. Ben Vaughan
Title Test Details Pattern Title
Expression
^(?!\d[1]{2}|[5]{3})([2-9]\d{2})([. -]*)\d{4}$
Description
Validates *usable* US telephone numbers (possibly Canadian and Caribbean Islands as well?) Numbers cannot beginning with zero, one, (any number)11, or 555. It will allow either a hyphen, space or period as a separator. Technically (and contrary to popular belief) most 555- numbers ARE valid numbers [see http://www.nanpa.com/nas/public/form555MasterReport.do?method=display555MasterReport ] but they are unlikely to be used by normal folks. Therefore, excluding them with this regex is useful to prevent bogus/fraudulent telephone numbers in forms. FYI, the fictitious 555- numbers used in the movies and TV are only in the range of 555-0100 through 555-0199. Not very many, huh?
Matches
222-2222 | 295-5000
Non-Matches
555-1234 | 411-5555 | 099-9999
Author Rating: Not yet rated. JP Honeywell
Title Test Details Pattern Title
Expression
(^\([0]\d{2}\))(\d{6,7}$)
Description
Validator for New Zealand Mobile phone numbers. Will look for the first number being a 0 and must be a number or either 6 or 7 digits long after to initial (021) suffix
Matches
(021)1234567 | (021)123456 | (000)000000
Non-Matches
(123)1234567 | 025123456 | 0252345678
Author Rating: Not yet rated. Graeme Allwood
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
^(\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
Change page:   |    Displaying page 3 of 6 pages; Items 41 to 60

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