Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regular expression
Message
De
19/05/2009 18:24:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01400633
Message ID:
01400838
Vues:
47
I have one question here - how available is the class used, I guess that would be VBScript? Does it come with the standard operating system, with WSH, or what?

>The regular expression would depends on the format dates are stored in your memo field. For 'mm/dd/yyyy' or 'dd/mm/yyyy'
>
>PUBLIC loList
>LOCAL loRegExp AS "VBScript.RegExp"
>lcText = "some text entered with date time field 04/09/2009 11:18:26 AM and then some more text 04/10/2009 02:45:00 PM whatever."
>loRegExp = CreateObject("VBScript.RegExp")
>loRegExp.Global = .T.
>loRegExp.Pattern =  "(\d{2}/\d{2}/\d{4})"
>loList = loRegExp.Execute(lcText)
>*? loList.Count
>FOR i=1 TO loList.Count
>	? loList.Item(i-1).Value
>ENDFOR
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform