Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I carry out pattern matching
Message
De
13/04/1999 01:48:28
Mark Austen
Schooner Software Limited
Msida, Malta
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00207620
Message ID:
00207701
Vues:
11
John,

Markus Egger had a good idea about this, he kept the address in a memo field and also parsed it out into separate 'hidden' fields for the Town, County/State, Country and Postcode in the same sort of way as Outlook does. The user enters the address and the application sets the 'hidden' fields and displays them to the user for confirmation. The user either accepts them or corrects and accepts them, but what the see on the form is the address in the memo field.

The advantage of this is the ability to cope with international address formats. In your case it would allow you to use the postcode field as a search pattern in the address memo field using strtran to replace it with the correct format.

You also get the advantage of being able to easily search on Town, County/State, Country and Postcode without having to go through code shenanagins to achieve it.

>I'm trying to clean some address data in FoxPro 5.0 and want to be able to upper case certain patterns - in this case postcodes.
>
>How can I get my code to check for a pattern of say
>J7n 1h4 - which is a Canadian postcode that mistakenly got 'proppered' in an earlier pass.
Regards,

MarkA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform