Regex for validating canadian postal code
-
/[ABCEGHJKLMNPRSTVXY][0-9][ABCEGHJKLMNPRSTVWXYZ][s][0-9][ABCEGHJKLMNPRSTVWXYZ][0-9]/ is supposed to validate a canadian postal code.
Based on https://regex101.com/ , I believe it is correct.
When trying to use it to validate a field in my database, it doesn’t seem to do anything. There is probably something that I don’t understand…
Any idea ?
Thanks,
GAston
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Regex for validating canadian postal code’ is closed to new replies.