Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining Character Strings
Message
 
 
To
14/08/2000 15:47:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00404673
Message ID:
00404678
Views:
9
>Hey All,
>
>I have a table that I'm validating against...the fied I'm checking is called Pat_id. The format is 123-4567-89910. And the field is all character.
>
>How can I check to verify that the format of the id is 3, hyphen, 4, hyphen, 5.
>
>
>how can I create a class that handle that chcking

Jeffrey,

Check thread Coding, syntax & commands Re: Checking string for predefined format Thread #403485 Message #403529
From 10/08/2000 13:48:19
Sergey Berezniker #006793
ISG
Bronx, New York
To 10/08/2000 13:24:46
Nadya Nosonovsky #026578
The Warren Group
Boston, Massachusetts
======================
--------------------------------------------------------------------------------

One more try :)

lcMask = "999999X-X999999X-X999999XX-XX999999X-XXXXXX"
lcAPN = "123456A-B789012C-D345678EF-GH901234I-KLMNO"

lcDigits = "0123456789"
lcLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

lcAPNUniform = CHRTRAN( lcAPN, lcDigits+lcLetters, ;
REPLICATE("9", 10)+ REPLICATE("X", 26))

RETURN lcAPNUniform = lcMask
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform