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 2 of 6 pages; Items 21 to 40
Title Test Details U.S. Street Address
Expression
^(?n:(?<address1>(\d{1,5}(\ 1\/[234])?(\x20[A-Z]([a-z])+)+ )|(P\.O\.\ Box\ \d{1,5}))\s{1,2}(?i:(?<address2>(((APT|B LDG|DEPT|FL|HNGR|LOT|PIER|RM|S(LIP|PC|T(E|OP))|TRLR|UNIT)\x20\w{1,5})|(BSMT|FRNT|LBBY|LOWR|OFC|PH|REAR|SIDE|UPPR)\.?)\s{1,2})?)(?<city>[A-Z]([a-z])+(\.?)(\x20[A-Z]([a-z])+){0,2})\, \x20(?<state>A[LKSZRAP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADL N]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD] |T[NX]|UT|V[AIT]|W[AIVY])\x20(?<zipcode>(?!0{5})\d{5}(-\d {4})?))$
Description
captures US street address. Address format: ##### Street 2ndunit City, ST zip+4 address1 - must have street number and proper case street name. no punctuation or P.O Box #### punctuation manditory for P.O. address2 - optional secondary unit abbr. Secondary range required for some units. City - Proper case city name. State - State abbreviation. All caps zip - zip+4. Can't be all zeroes Abbreviations for secondary units and States are those used by the US Postal Service. http://www.usps.com/ncsc/lookups/usps_abbreviations.html Certain secondary units require a secondary range, see the above link THis RE isn't unbreakable, Probably will allow some false positives but should work for most addresses.
Matches
123 Park Ave Apt 123 New York City, NY 10002 | P.O. Box 12345 Los Angeles, CA 12304
Non-Matches
123 Main St | 123 City, State 00000 | 123 street city, ST 00000
Author Rating: The rating for this expression. Michael Ash
Title Test Details State Codes
Expression
^(?-i:A[LKSZRAEP]|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])$
Description
The RE match U.S. state abbreviation used by the U.S. Post Office.
Matches
AL | CA | AA
Non-Matches
New York | California | ny
Author Rating: The rating for this expression. Michael Ash
Title Test Details Phone Numbers
Expression
^(1\s*[-\/\.]?)?(\((\d{3})\)|(\d{3}))\s*[-\/\.]?\s*(\d{3})\s*[-\/\.]?\s*(\d{4})\s*(([xX]|[eE][xX][tT])\.?\s*(\d+))*$
Description
This regular expressions matches phone numbers with area codes and optional US country code and optional phone extension. User have so many ways of entering phone numbers into input fields. This allows for some of the ones I've encountered. Feel free to contact me if you find ones that do not match.
Matches
2405525009 | 1(240) 652-5009 | 240/752-5009 ext.55
Non-Matches
(2405525009 | 2 (240) 652-5009
Author Rating: The rating for this expression. Dean Dal Bozzo
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: The rating for this expression. adam willding
Title Test Details Pattern Title
Expression
^((?:\+27|27)|0)(=72|82|73|83|74|84)(\d{7})$
Description
Verifies South African mobile numbers with or without the country code.
Matches
+27832762842 | 27832762842 | 0832762842
Non-Matches
083 276 2842
Author Rating: The rating for this expression. Mpho Molahloe
Title Test Details Pattern Title
Expression
^0[234679]{1}[\s]{0,1}[\-]{0,1}[\s]{0,1}[1-9]{1}[0-9]{6}$
Description
The regex matches the UAE land phone numbers. Checks the area codes[04,02,06...etc] strictly. Force user to input phone numbers in strict manner(it take input 04 3452488, but not 04______spaces_______3452488)
Matches
04 3452488 | 04 -3452488 | 04 - 3452499
Non-Matches
01 -3452488 | 04 34524888 | 08 3452488
Author Rating: The rating for this expression. Vathachira Joseph Bino
Title Test Details Pattern Title
Expression
(((^[BEGLMNS][1-9]\d?)|(^W[2-9])|(^(A[BL]|B[ABDHLNRST]|C[ABFHMORTVW]|D[ADEGHLNTY]|E[HNX]|F[KY]|G[LUY]|H[ADGPRSUX]|I[GMPV]|JE|K[ATWY]|L[ADELNSU]|M[EKL]|N[EGNPRW]|O[LX]|P[AEHLOR]|R[GHM]|S[AEGKL-PRSTWY]|T[ADFNQRSW]|UB|W[ADFNRSV]|YO|ZE)\d\d?)|(^W1[A-HJKSTUW0-9])|(((^WC[1-2])|(^EC[1-4])|(^SW1))[ABEHMNPRVWXY]))(\s*)?([0-9][ABD-HJLNP-UW-Z]{2}))$|(^GIR\s?0AA$)
Description
For the terminally hard of thinking, a version of my UK postcode validator without WHITESPACE. Unlike most validators on regexlib, this knows valid postcode combinations, e.g. W1A is permitted, W1 is not, but W2 is. It should catch between 95-98% of invalid postcodes.
Matches
W1A 1AA | EC1V1JN | N7 8BQ
Non-Matches
W1A 1AM | BM1 1AB | EC1 1AA
Author Rating: The rating for this expression. Howard Richards
Title Test Details Pattern Title
Expression
((\(\d{3,4}\)|\d{3,4}-)\d{4,9}(-\d{1,5}|\d{0}))|(\d{4,12})
Description
telphone number check.
Matches
0833-1234567-8888 | (0833)1234567-8888 | 12345678
Non-Matches
ceocio | !@$@#$
Author Rating: The rating for this expression. Liu Wei
Title Test Details Pattern Title
Expression
^(\+97[\s]{0,1}[\-]{0,1}[\s]{0,1}1|0)50[\s]{0,1}[\-]{0,1}[\s]{0,1}[1-9]{1}[0-9]{6}$
Description
regex which matches UAE mobile phone numbers. Its capable to take inputs +97150 3827741, +97-150-3827741, +97150 - 3827741,050 3827741, 050 - 3827741 Enjoy REGEXXXXXXX!!!!!!!
Matches
+97150 3827741 | 0503827741 | 050-3827741
Non-Matches
040 3827741 | 05 3827741 | 050_______spaces_______3827741
Author Rating: The rating for this expression. Vathachira Joseph Bino
Title Test Details Pattern Title
Expression
^(\([2-9]|[2-9])(\d{2}|\d{2}\))(-|.|\s)?\d{3}(-|.|\s)?\d{4}$
Description
Telephone validator allowing user to enter 10 digit telephone number with segments of number separated by hyphens, periods or spaces. Also braces allowed around area code.
Matches
213-123-1234 | 2131231234 | (213) 123-1234
Non-Matches
123-123-1234
Author Rating: The rating for this expression. MARK J KRISBURG
Title Test Details Pattern Title
Expression
^\d{5}((-|\s)?\d{4})?$
Description
Single field zip code validator, useful for Web Forms. Allows user to enter 5-digit or 5-digit plus 4 zip code, with hyphen or space or NO space between last 4 digits.
Matches
92078-4705 | 920784705 | 92078 4705
Non-Matches
9027x | 902 | 92078.4705
Author Rating: The rating for this expression. MARK J KRISBURG
Title Test Details Pattern Title
Expression
^(([A-Z]{1,2}[0-9]{1,2})|([A-Z]{1,2}[0-9][A-Z]))\s?([0-9][A-Z]{2})$
Description
Matches UK postcodes of the below formats. The space is optional. AN NAA AAN NAA ANN NAA ANA NAA AANA NAA AANN NAA
Matches
A11AA | AA1A 1AA | AA11 1AA
Non-Matches
AAA 1AA | AA11A 1AA | AAA1AA
Author Rating: The rating for this expression. Phil A
Title Test Details Pattern Title
Expression
^[0-9]{6}
Description
I know its simple, yet there was no Russian postal code regular expression on the RegExLib. Just in case some needs to know the format.
Matches
150016
Non-Matches
qqww
Author Rating: The rating for this expression. Roman Lukyanenko
Title Test Details Pattern Title
Expression
^(?<national>\+?(?:86)?)(?<separator>\s?-?)(?<phone>(?<vender>13[0-4])(?<area>\d{4})(?<id>\d{4}))$
Description
Just test in C#. Validates a China Unicom mobile phone number with (or without) the International code.
Matches
+8613012345678 | 86 13012345678 | 13245679087
Non-Matches
+86130123456781231434352 | 13560012513 | ++8613012345678
Author Rating: The rating for this expression. Evan Tao
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
(\s*\(?0\d{4}\)?(\s*|-)\d{3}(\s*|-)\d{3}\s*)|(\s*\(?0\d{3}\)?(\s*|-)\d{3}(\s*|-)\d{4}\s*)|(\s*(7|8)(\d{7}|\d{3}(\-|\s{1})\d{4})\s*)
Description
another uk telephone number regex. This was adapted from another on this site http://www.regexlib.com/REDetails.aspx?regexp_id=297 I added support for hyphens and for london shorthand numbers ie. 8234-1234 72341234 Still want to be permissive where possible....Still need to sort out the all zeros, also not sure if numbers with 4 digits followed by 7 used in london 0208-234-1234 is the area of the uk where this occurs, or all areas outside of london are in format 5 digits followed by 6 digits ie. 01608 123456. If that is the case for the 4-7 pattern only 0208 or 0207 could be enforced.
Matches
0208 993 5689 | 0208-993-5689 | 89935689
Non-Matches
1608 123 456
Author Rating: The rating for this expression. Matt Baskey
Title Test Details Pattern Title
Expression
(02\d\s?\d{4}\s?\d{4})|(01\d{2}\s?\d{3}\s?\d{4})|(01\d{3}\s?\d{5,6})|(01\d{4}\s?\d{4,5})
Description
Validates UK domestic landline phone numbers. Valid formats are: 029 99999999 or 029 9999 9999; 0199 9999999 or 0199 999 9999; 01999 99999; 01999 999999; 019999 9999; 019999 99999. 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
020 1234 5678 | 0123 4567890 | 01234 456789
Non-Matches
02476 123456 | 0845 123456 | 07712 345678
Author Rating: The rating for this expression. John Chivers
Title Test Details Pattern Title
Expression
^[a-zA-Z]{1}[0-9]{1}[a-zA-Z]{1}(\-| |){1}[0-9]{1}[a-zA-Z]{1}[0-9]{1}$
Description
This expression will help match Quebec's postal codes.
Matches
h2j-3c4 | H2J 3C4 | H2J-3c4
Non-Matches
H2J_3C4 | H213C4 | 123456
Author Rating: The rating for this expression. Frederic Trudeau
Title Test Details Pattern Title
Expression
^((\+){0,1}91(\s){0,1}(\-){0,1}(\s){0,1}){0,1}98(\s){0,1}(\-){0,1}(\s){0,1}[1-9]{1}[0-9]{7}$
Description
The Regex validate the mobile numbers in India. Gives flexibility to user to enter numbers in different format like +919847444225, +91-98-45017381, 9844111116, 98 44111112, 98-44111116 ###Enjoy REGEX###
Matches
+919847444225 | +91-98-44111112 | 98 44111116
Non-Matches
+919800444225 | +947444225 | 44111116
Author Rating: The rating for this expression. Vathachira Joseph Bino
Title Test Details Pattern Title
Expression
^(?:(?<1>[(])?(?<AreaCode>[2-9]\d{2})(?(1)[)])(?(1)(?<2>[ ])|(?:(?<3>[-])|(?<4>[ ])))?)?(?<Prefix>[1-9]\d{2})(?(AreaCode)(?:(?(1)(?(2)[- ]|[-]?))|(?(3)[-])|(?(4)[- ]))|[- ]?)(?<Suffix>\d{4})$
Description
Regular expression for validating US telephone numbers with OPTIONAL area code. Matches various permutations of formatting characters (parenthesis, space, dash). Parses the telephone number area code, prefix, and suffix to named groups to facilitate program manipulation. Area code is optional and can optionally be enclosed in parentheses. Rejects area codes that begin with 0 or 1 and prefixes that begin with 0. Rejects all telephone numbers that do not match on exactly 7 digits, or on exactly 10 digits with the optional area code, not counting the formatting characters.
Matches
333-4444 | 222 333 4444 | (222) 333-4444
Non-Matches
222333 4444 | 222-333 4444 | (222)-333 4444
Author Rating: The rating for this expression. Jerry Schmersahl
Change page:   |    Displaying page 2 of 6 pages; Items 21 to 40

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