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

   Displaying page 1 of 1 pages; Items 1 to 18
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
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: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
^\d{5}(-\d{4})?$
Description
Zip+4 Zipcode RegEx. You may ommit the +4 digits but you must also then ommit the hyphen/dash as well. In 1983, the Postal Service™ began using an expanded ZIP Code™ number called called the &quot;ZIP+4&#174;&quot; Code. The nine digits of a ZIP+4 code (e.g., 12345-6789) is broken down as follows: [123]Sectional Center or Large City. [45]Post Office™ facility or Delivery Area. [-]Required &quot;dash&quot; or &quot;hyphen&quot;. [67]Sector or Several Blocks. [89]Segment or One Side of a Street. Also just FYI, ZIP codes in the northeast US frequently start with '0' or '00'. [00988-Carolina, PR] [03110-Bedford, NH]. Thanks, Ryan v-
Matches
98121 | 00988 | 12345-6789
Non-Matches
98121- | 12345-678 | 1234
Author Rating: The rating for this expression. Ryan Van Aken
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
^[ \w]{3,}([A-Za-z]\.)?([ \w]*\#\d+)?(\r\n| )[ \w]{3,},\x20[A-Za-z]{2}\x20\d{5}(-\d{4})?$
Description
This is a simple expression to check a US street address entered on either one or two lines. Being short it does not check that the road qualifer is &quot;valid&quot; (eg. drive, avenue, etc), but it does allow for the extended zip code. A word of warning, the multiline mode can be picky about ending the first line with extra space.
Matches
123 Anywhere Dr. apt #99 Somewhere, ST 55789 | 123 Anywhere Dr. Somewhere, ST 55789 | 123 Anywhere D
Non-Matches
123 Anywhere Drive #99 Somewhere, ST 55789 - 1234 | 123 Anywhere Dr. apt. #99 Somewhere, ST 55789 |
Author Rating: The rating for this expression. Gideon Engelberth
Title Test Details Address in minor to major order
Expression
((?<strPOBox>((POBox|PO\sBox)\s*\d*)),?\s?)?(((?<strUnit>([\w\d\s\,]*)),\s?)?( (?<strStreet>([\w\s\-]*\w\s(st\s)?[\w]*\s(street|st|road|rd|close|cl|avenue|ave|av|path|ph|drive|drv|LOOP|COURT|CT|CIRCLE|LANE|LN)) ),?\s?))?((?<strTown>([\p{Ll}\p{Lu}\p{Lo}\p{Pc}\p{Lt}\p{Lm}\s]*)),?\s?)?((?<strState>(Victoria|VIC|New South Wales|NSW|South Australia|SA|Northern Territory|NT|West Australia|WA|Tasmania|TAS|ACT|Queensland|QLD))\s*)?(?<strPostalCode>(\d{4}),?\s?)?(?<strCountry>(Australia))?
Description
This regular expression using named groups returns semantic tokens and is designed for Australian addresses in one line. Any part of an address may be omitted, as long as parts are in minor to major order. It should not be difficult to modify the regular express for analysing multi-line addresses. With a little modification, this regex may work for other postal address formats in minor to major order. The syntax is based on dot Net regular expression, with "options = RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace". The order is [POBox][ExtAdr][Street][Town][State][PostalCode][Country].
Matches
Shop S1, Sussex Centre, 401 Sussex St, Sydney | 28 Lidco Street, Arndell Park, Sydney 2148 | Level 1, 198 Elizabeth St, Surry Hills 2010 | Room 2, Level 1, 198 Elizabeth St, Surry Hills, NSW 2010 | 541 Pittwater Rd, Brookvale 2100 | 2 Maniangi Court, Macedon, 3440 | PO Box 1531, Keveland, QLD 4163 | St Lucia Golf Links, 22 St George St, St Lucia, QLD | PO Box 1531, St Lucia, QLD 4163
Non-Matches
No man land
Author Rating: Not yet rated. Zijian
Title Test Details Street Number only
Expression
((\d{1,6}\-\d{1,6})|(\d{1,6}\\\d{1,6})|(\d{1,6})(\/)(\d{1,6})|(\w{1}\-?\d{1,6})|(\w{1}\s\d{1,6})|((P\.?O\.?\s)((BOX)|(Box))(\s\d{1,6}))|((([R]{2})|([H][C]))(\s\d{1,6}\s)((BOX)|(Box))(\s\d{1,6}))?)$
Description
This is my first attempt at creating a regex. For a street number only field, allows 7 digit number, 6 digit number with one preceding letter (the letter can have a hyphen, space, or nothing between it and the numbers), two 7 digit numbers divided by a "/","\", or "-", variations of P.O. Box we allow, Rural Route, and Highway Contract acoording to U.S. Postal rules.
Matches
4444, G 4444, 333/555, P.O. Box 432, RR 4 Box 567
Non-Matches
po box 432, GG4321, 48392021
Author Rating: Not yet rated. Michael Dallaire
Title Test Details French postal address
Expression
((^[0-9]*).?((BIS)|(TER)|(QUATER))?)?((\W+)|(^))(([a-z]+.)*)([0-9]{5})?.(([a-z\'']+.)*)$
Description
Find differents parts of a french mail's address. 0 : Complete address 1 : Number + BIS, TER or QUATER 2 : Number 3 et 4 : BIS, TER or QUATER 5 à 9 : Nothing 10 : Street 11 : Nothing 12 : Postal code 13 : City
Matches
48 bis Avenue Des Champs Élysée 75001 Paris
Non-Matches
Rue De La Liberté 10 1000 Bruxelle
Author Rating: Not yet rated. PLAIS Lionel
Title Test Details Address Parser
Expression
^(\d{3,})\s?(\w{0,5})\s([a-zA-Z]{2,30})\s([a-zA-Z]{2,15})\.?\s?(\w{0,5})$
Description
A quick and dirty expression for splitting up a generic street address
Matches
101 W Main St | 101 W Main St. N | 101 Main St N
Non-Matches
Main St | 55a Main St | 101 W Main St Apt 5
Author Rating: Not yet rated. NoBug
Title Test Details Street Types
Expression
A(?:CCESS|LLEY|PPROACH|R(?:CADE|TERY)|VE(?:NUE)?)|B(?:A(?:NK|SIN|Y)|E(?:ACH|ND)|L(?:DG|VD)|O(?:ULEVARD|ARDWALK|WL)|R(?:ACE|AE|EAK|IDGE|O(?:ADWAY|OK|W))|UILDING|YPASS)|C(?:A(?:NAL|USEWAY)|ENTRE(?:WAY)?|HASE|IRC(?:LET?|U(?:IT|S))|L(?:OSE)?|O(?:MMON|NCOURSE|PSE|R(?:NER|SO)|UR(?:SE|T(?:YARD)?)|VE)|R(?:ES(?:CENT|T)?|IEF|OSS(?:ING)?)|U(?:LDESAC|RVE))|D(?:ALE|EVIATION|IP|OWNS|R(?:IVE(?:WAY)?)?)|E(?:ASEMENT|DGE|LBOW|N(?:D|TRANCE)|S(?:PLANADE|TATE)|X(?:P(?:(?:RESS)?WAY)|TENSION))|F(?:AIRWAY|IRETRAIL|O(?:LLOW|R(?:D|MATION))|R(?:(?:EEWAY|ONT(?:AGE)?)))|G(?:A(?:P|RDENS?|TE(?:S|WAY)?)|L(?:ADE|EN)|R(?:ANGE|EEN|O(?:UND|VET?)))|H(?:AVEN|E(?:ATH|IGHTS)|I(?:GHWAY|LL)|UB|WY)|I(?:NTER(?:CHANGE)?|SLAND)|JUNCTION|K(?:EY|NOLL)|L(?:A(?:NE(?:WAY)?)?|IN(?:E|K)|O(?:O(?:KOUT|P)|WER))|M(?:ALL|E(?:A(?:D|NDER)|WS)|OTORWAY)|NOOK|O(?:UTLOOK|VERPASS)|P(?:A(?:R(?:ADE|K(?:LANDS|WAY)?)|SS|TH(?:WAY)?)|DE|IER|L(?:A(?:CE|ZA))?|O(?:CKET|INT|RT)|RO(?:MENADE|PERTY)|URSUIT)?|QUA(?:D(?:RANT)?|YS?)|R(?:AMBLE|D|E(?:ACH|S(?:ERVE|T)|T(?:REAT|URN))|I(?:D(?:E|GE)|NG|S(?:E|ING))|O(?:AD(?:WAY)?|TARY|U(?:ND|TE)|W)|UN)|S(?:(?:ER(?:VICE)?WAY)|IDING|LOPE|PUR|QUARE|T(?:EPS|RAND|R(?:EET|IP))?|UBWAY)|T(?:ARN|CE|ERRACE|HRO(?:UGHWAY|WAY)|O(?:LLWAY|P|R)|RA(?:CK|IL)|URN)|UNDERPASS|V(?:AL(?:E|LEY)|I(?:EW|STA))|W(?:A(?:LK(?:WAY)?|Y)|HARF|YND)
Description
Matches any and all matches of the street types detailed at http://www.abs.gov.au/Ausstats/abs@.nsf/66f306f503e529a5ca25697e0017661f/2a46946e38f31d0cca256c62007dbb98!OpenDocument
Matches
RD ROAD ROADWAY HIGHWAY HWY
Non-Matches
RAD STRET PAS
Author Rating: Not yet rated. Zj6Ul8Eo9
Title Test Details German Street Name, Deutsche Strassennamen
Expression
^([A-ZÄÖÜ][a-zäöüß]+(([.] )|( )|([-])))+[1-9][0-9]{0,3}[a-z]?$
Description
checks German Street Name with housenumber without Mannheim Überprüft Deutsche Strassennamen mit Hausnummer (ohne Mannheit)
Matches
Kaiserallee 1 | Kaiser-Wilhelm-Allee 1111a | Mühlenstr. 33
Non-Matches
Kaiserallee | Kaiser-Wilhelm-Allee 1aa | 1 Kaiserstrasse
Author Rating: Not yet rated. Martin Hauck
Title Test Details UK Street Address
Expression
\A(\d+[a-zA-Z]{0,1}\s{0,1}[-]{1}\s{0,1}\d*[a-zA-Z]{0,1}|\d+[a-zA-Z-]{0,1}\d*[a-zA-Z]{0,1})\s*+(.*)
Description
UK Street Address splits streetname and housenumber. Feel free to add more suggestions to help optimize this pattern.
Matches
4-6 Castle Street | 85c Main Road | 168 Main Road | 4 - 6 Castle Street | 4A-6B Castle Street | 4 - 6B Castle Street
Non-Matches
none
Author Rating: The rating for this expression. Vincent Hayward
Title Test Details NL Street Address
Expression
\A(.*?)\s+(\d+[a-zA-Z]{0,1}\s{0,1}[-]{1}\s{0,1}\d*[a-zA-Z]{0,1}|\d+[a-zA-Z-]{0,1}\d*[a-zA-Z]{0,1})
Description
This pattern splits the streetname and housenumber of Dutch Postal Addresses.
Matches
Sophia van Teylingenstraat 19 | Abrikozenstraat 116A | Laan van Meerdervoort 1218-1220 | Laan van Meerdervoort 1218 - 1220
Non-Matches
none
Author Rating: The rating for this expression. Vincent Hayward
Title Test Details US Street Address Only
Expression
^\d{1,6}\040([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^\d{1,6}\040([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^\d{1,6}\040([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$
Description
This will accept any 6 digit street address only, with min of two and up to four street names.
Matches
123456 My Street | 123 West Main St | 12345 Via De La Rosa
Non-Matches
123 Street | 1234 W Side Street
Author Rating: Not yet rated. Robert Hall
Title Test Details Australian Residential Address
Expression
^((unit|u|)\s*)?(?<unit>\d*\w?)?(\s+|/)?(?<streetNo>\d+(\-\d+)?)\s+(?<streetName>\w+)\s+(?<streetType>\w+)\s+(?<suburb>\w+(\s+\w+)?)\s+(?<state>\w+)\s+(?<postcode>\d{4})$
Description
It is not very strong and I am still working on that. Would like to put it up so that people can help to complete it. The problem is with addresses that do not have unit number, it picks the first digit of the street number as the unit number.
Matches
unit 10/11-15 Miller St North Sydney NSW 2068
Non-Matches
11-15 Somewhere Ave Suburb NSW 2068
Author Rating: Not yet rated. Reza
Title Test Details DK Street Address (Basic)
Expression
^((.){1,}(\d){1,}(.){0,})$
Description
Does a very basic validation on Danish street addresses. It ensures that the format "Address No" is honored, but also allows any char to be put after the address. This is to ensure additions like floor, and which door it is. Ex. "Addrees No Floor LeftDoor." Enjoy!
Matches
Teststreet 32 | Tørststræde 4 | Tørststræde 24 1. tv
Non-Matches
Tørststræde | 2 Tørststræde
Author Rating: Not yet rated. Mikkel Petersen
Title Test Details Slovak Street Names
Expression
^([\w\s\W]+[\w\W]?)\s([\d\-\\\/\w]*)?
Description
Slovak street names with numbers
Matches
Ul. 1 Mája 1877/51 | J. Krala 1877/A | Makovickeho 15
Non-Matches
J.Krala1877
Author Rating: Not yet rated. Mário Moravčík (SK)
Title Test Details parts of an address
Expression
^ (?: (?<strDetail>(?:C/[-O]?[a-z\ ]*?)?\ *)? (?<strPOBox>P[\.\ ]?O[\.\ ]?\ ?Box\ *\d+) | (?:(?<strDetail>(?:C/[-O]?)?[\w\ ,\.']+?),?/?\ *?)? \ *?(?<strStreetNum>(?:\d+-)?\d+[a-z]?)[\ ] (?<strStreetName>(?:[\w\ '-]|st)+) (?:\b(?<strStreetType>ALLEY|ALLY|APPROACH|APP|ARCADE|ARC|AVENUE|AVE|BOULEVARD|BLVD|BROW|BYPASS|BYPA|CAUSEWAY|CWAY|CIRCUIT|CCT|CIRCUS|CIRC|CLOSE|CL|COPSE|CPSE|CORNER|CNR|COVE|COURT|CRT|CT|CRESCENT|CRES|DRIVE|DR|END|ESPLANANDE|ESP|FLAT|FREEWAY|FWAY|FRONTAGE|FRNT|GARDENS|GDNS|GLADE|GLD|GLEN|GREEN|GRN|GROVE|GR|HEIGHTS|HTS|HIGHWAY|HWY|LANE|LINK|LOOP|MALL|MEWS|PACKET|PCKT|PARADE|PDE|PARK|PARKWAY|PKWY|PLACE|PL|PROMENADE|PROM|RESERVE|RES|RIDGE|RDGE|RISE|ROAD|RD|ROW|SQUARE|SQ|STREET|ST|STRIP|STRP|TARN|TERRACE|TCE|THOROUGHFARE|TFRE|TRACK|TRAC|TRUNKWAY|TWAY|VIEW|VISTA|VSTA|WALK|WAY|WALKWAY|WWAY|YARD )\b) ) (?:,?\ *?(?<strTown>[a-z'.]+(?:,?\ +[a-z'.]+)*?))? (?:,?\ *?(?<strState>Victoria|VIC|New South Wales|NSW|South Australia|SA|Northern Territory|NT|West Australia|WA|Tasmania|TAS|Australian Capital Territory|ACT|Queensland|QLD))? (?:,?\ *?(?<strPostalCode>\d{3,4}))? (?:,?\ *?(?<strCountry>Au(?:stralia)?))? (\s(?=[^$]))* $
Description
Divides a single line address into detail, street number, street name , street type, town, postcode, state, country. designed for Australian addresses but can be modified. switches: ignore expression whitespace, case insensitive. teseted using silverlight tester from regexlib. based on regex by Zijian http://regexlib.com/REDetails.aspx?regexp_id=1964
Matches
Shop S1, Sussex Centre, 401 Sussex St, Sydney; 28 Lidco Street, Arndell Park, Sydney 2148; Level 1, 198 Elizabeth St, Surry Hills 2010; Room 2, Level 1, 198 Elizabeth St, Surry Hills, NSW 2010; 541 Pittwater Rd, Brookvale 2100; 2 Maniangi Court, Macedon, 3440; PO Box 1531, Keveland, QLD 4163; St Lucia Golf Links, 22 St George St, St Lucia, QLD; PO Box 1531, St Lucia, QLD 4163;
Non-Matches
M/S 1014 Bell 4408; Kingswood Hostel Ramsay Street Toowoomba 4350; 15osborne Court Logan Holme 4129; Miamba Condamine 4416; Crows Nest Nursing Home Crows Nest 4352; 30 Skyline Drive M/S 617 Toowoomba Mail 4352; M/S 1945 Peranga 4352; 22a Wirra Wirra Toowoomba 4350; C/- Blue Care, Stenner Street Toowoomba 4350; Carline' M/S 848 Warwick 4370; 336 Oakey-Biddeston Rd, Ms 212 Oakey 4401; Kingswood Hostel Ramsay Toowoomba 4350; Shalom N/H - Rosalie & Lockyer Toowoomba 4350; Unit 2 Glenfield Grange,110 Spring Stree Toowoomba 4350; Villa 65 Westhaven Retirement Village Toowoomba 4350; Y
Author Rating: The rating for this expression. A.B.
   Displaying page 1 of 1 pages; Items 1 to 18

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