Published in: Regular Expression
Z5Z-5Z5 orZ5Z5Z5
/^\D{1}\d{1}\D{1}\-?\d{1}\D{1}\d{1}$/
Comments
Subscribe to comments
You need to login to post a comment.
Mastering Regular Expressions
As this book shows, a command of regular expressions is an invaluable skill. Regular expressions allow you to code complex and subtle text processing that you never imagined could be automated. Regular expressions can save you time and aggravation. They can be used to craft elegant solutions to a wide range of problems. Once you've mastered regular expressions, they'll become an invaluable part of your toolkit. You will wonder how you ever got by without them.
edwinjanmoss on 10/19/07
2 people have marked this snippet as a favorite
Published in: Regular Expression
Z5Z-5Z5 orZ5Z5Z5
/^\D{1}\d{1}\D{1}\-?\d{1}\D{1}\d{1}$/
Subscribe to comments
You need to login to post a comment.
No postal code includes the letters D, F, I, O, Q, or U. The letters W and Z are used, but are not currently used as the first letter.