Posted By

edwinjanmoss on 10/19/07


Tagged


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

shovanjoshi
copyleft
dmitryfstyleca
pezland


US zip code


 / Published in: Regular Expression
 

99999 or 99999-9999

  1. /(^\d{5}$)|(^\d{5}-\d{4}$)/

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Scooter on May 24, 2008

/^[\d]{5}(-[\d]{4})?$/

You need to login to post a comment.