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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find 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
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: Thanks
Name: Rodney
Date: 4/22/2009 1:44:06 PM
Comment:
Works with Jquery


Title: .NET friendly
Name: p.net
Date: 3/24/2005 11:39:08 PM
Comment:
First one that has worked with .NET RegexValidator thanks!


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