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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(^\d{5}$)|(^\d{5}-\d{4}$)
Description
I know its probaly in the library, but i did not see it. US zip pattern 5 digits 01234 or 5 digits + 4 01234-1234
Matches
12345 | 12345-6789 | 01234
Non-Matches
1A234 | 12345-aaaa | 12345 1234
Author Rating: Not yet rated. Jay Solomon
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Optimization
Name: George
Date: 12/20/2012 1:08:11 AM
Comment:
It's can be written shorter: \d{5}(-\d{4})?


Title: Optimization
Name: George
Date: 12/20/2012 1:07:14 AM
Comment:
It's can be written shorter: \d{5}(-\d{4})?


Title: thank you
Name: abraham luna
Date: 8/31/2006 1:52:19 PM
Comment:
i really needed this expression.


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