Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Regular expression
Message
From
19/05/2009 10:25:10
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01400633
Message ID:
01400640
Views:
63
Thanks Sergey.

>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
>
>
>>I have a memo field that can contain one or many dates.
>>
>>I want to extract the dates from that memo.
>>
>>Sergey suggested that regular expressions would do the trick.
>>
>>I think I saw one (perhaps many) thread here that discussed that topic.
>>
>>What I'm particularly interested in is regular expression for dates.
>>
>>Anyone remembers or have a new solution to my problem?
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Previous
Reply
Map
View

Click here to load this message in the networking platform