HomeForum
Welcome, Guest

Canadian post code format
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Canadian post code format

Canadian post code format 10 months, 2 weeks ago #3071

  • Daniel
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Hi,

According to the Canadian Zipcode you must exclude the letters D, F, I, O, Q, & U in the 2nd & 3rd letters. Since insensitivity can be expressed with /i the below \"blocks\"
should work:
As shown:
^((\\d{5}-\\d{4})|(\\d{5})|([AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\\d[A-Za-z]\\s?\\d[A-Za-z]\\d))$
Suggested replacement for Alpha blocks:
[ABCEGHJKLMNPRSTVXY]
[ABCEGHJKLMNPRSTVWXYZ]
[ABCEGHJKLMNPRSTVWXYZ]
If I am wrong, you should fix the CA zipcode.

Daniel

Re: Canadian post code format 10 months, 2 weeks ago #3072

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2182
  • Karma: 12
Daniel

To be honest we are not the best experts when it comes to regular expression.
It is not a problem to change expression.

The question is: are you 100 percent sure that the one you suggested is the correct one?

Mike
  • Page:
  • 1
Time to create page: 0.15 seconds

Testimonials

"Pricing is an important aspect of our software investment program and DBSL exceeded our expectations in both performance and value for money."

Dana Sander,
ICT Manager

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top