/ Published in: Regular Expression
99999 or 99999-9999
Expand |
Embed | Plain Text
/(^\d{5}$)|(^\d{5}-\d{4}$)/
Comments
Subscribe to comments
You need to login to post a comment.
edwinjanmoss on 10/19/07
4 people have marked this snippet as a favorite
shovanjoshi
copyleft
dmitryfstyleca
pezland
99999 or 99999-9999
/(^\d{5}$)|(^\d{5}-\d{4}$)/
Subscribe to comments
You need to login to post a comment.
/^[\d]{5}(-[\d]{4})?$/