Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find a bad zipcode
Message
De
30/11/2006 18:16:32
 
 
À
30/11/2006 18:01:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01170759
Message ID:
01173929
Vues:
10
>>>I have a character field zip c(5) containing zipcodes. I need to set a filter to select the bad entries which contain alpha characters. This is done in Access code using the LIKE function (not like('#####'), but VFP handles LIKE differently. This would also seem to be a simple matter but I can't seem to find the answer. I could find a bad entry by parsing the values but that doesn't serve my need to set a filter.
>>>
>>>Any thoughts?
>>
>>here using Regular Expression
>>
>>
>>loRegEx = CreateObject("VBScript.RegExp")
>>loRegEx.ignoreCase = .T.
>>loRegEx.global = .T.
>>loRegEx.pattern = "^[1-9][0-9]{4}$"
>>
>>SET FILTER TO loRegEx.Test(zip)
>>
>>
>
>Interesting, Thanks.

There are lots a ways to skin a fox.
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform