Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Urgent Help needed - string operations (no RegExp, pleas
Message
De
22/12/2001 09:19:06
 
 
À
22/12/2001 00:21:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00597614
Message ID:
00597732
Vues:
32
>>Nadya --
>>
>>As Ed mentioned, if you can handle that with an input mask, that's the best approach -- catch errors before they occur -- and allow the user the opportunity to fix at data entry time.
>>
>>I assumed that you were processing data after the fact, hence the need for some algorithmic approach.
>>
>>I tried that approach because I've wondered how to do pattern matching with string functions in VFP. I have to admit, it's somewhat clumsy. But, it's interesting to see what you can do with the tools you have.
>>
>>VFP is not designed as a pattern matching language like SNOBOL, those its influenced like AWK, Perl, VBA, Python, etc. Using regular expressions, it's a simple matter to indicate a match between either of 2 characters: [X|9].
>>
>
>There are any number of ActiveX or COM objects available with regular expressions; I use the VBScript.RegExp object from WSH, and JScript has regular expression parsing built in.

The only reason I can think that Nadya wants to avoid using a language hosting regular expressions is for performance. Parsing one string is one thing. Parsing a gazillion, which she seems to do rather regularly, is another. I know we're speaking in generalities here, but what sort of overhead does calling VBS.RegEx from VFP have over using native VFP commands?


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

Click here to load this message in the networking platform