3 Replies - 449 Views - Last Post: 13 June 2012 - 02:21 PM Rate Topic: -----

#1 Sham45  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 10-June 12

Verify Canadian Postal Code

Posted 12 June 2012 - 07:20 PM

Hello friends,

I'm using VB 6.0 and I'm trying to verify a Canadian postal code in a regular text box (with a msgbox). Canadian postal code format is like A1B 2C3 (Letter,Number,Letter,Number,Letter,Number). Actually the space between these parts is not important to me now. Could anybody help me on this??

Thanks
Sham... :D

Is This A Good Question/Topic? 0
  • +

Replies To: Verify Canadian Postal Code

#2 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,935
  • Joined: 19-May 09

Re: Verify Canadian Postal Code

Posted 12 June 2012 - 08:40 PM

Check out Regular Expressions if you're up to it. That's the most flexible way to verify a string format.
Was This Post Helpful? 0
  • +
  • -

#3 Sham45  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 10-June 12

Re: Verify Canadian Postal Code

Posted 13 June 2012 - 01:58 PM

View PostBobRodes, on 12 June 2012 - 08:40 PM, said:

Check out Regular Expressions if you're up to it. That's the most flexible way to verify a string format.

Can I get an example code if possible??
Was This Post Helpful? 0
  • +
  • -

#4 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,935
  • Joined: 19-May 09

Re: Verify Canadian Postal Code

Posted 13 June 2012 - 02:21 PM

Sure. Google "vb6 regular expression example". (Did I really have to tell you that?)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1