Other Resources:
Validating Canadian Postal Codes
How to write a regular expression to validate Canadian Postal Codes?
For example, T2X 1V4 is a valid Canadian postal codes.
✍: Guest
![]()
Here is the regular expression to validate Canadian postal codes:
[ABCEGHJKLMNPRSTVXY]\d[A-Z] ?\d[A-Z]\d
[ABCEGHJKLMNPRSTVXY] - 18 FSA possible letters
\d - A digit
[A-Z] - Any upper case letter
? - An optional space
\d - A digit
[A-Z] - Any upper case letter
\d - A digit
2013-01-29, 0👍, 0💬
Popular Posts:
Are you having problems using regular expressions when processing text strings in your applications ...
All credit card numbers issued by Diners Club must start with 300 through 305, 36 or 38 and have 14 ...
All credit card numbers issued by JCB have 3 sets of numbers: JCB cards start with 2131 have 15 digi...
Are you having problems using regular expressions when processing text strings in your applications ...
All credit card numbers issued by Diners Club must start with 300 through 305, 36 or 38 and have 14 ...