is a date
Yves COPPE
yvescoppe at mac.com
Sun Oct 15 16:00:05 EDT 2017
Hi,
Does such a text « 99/99/00 » exist ?
You can also always say that it is possible that « 15/10/17 » is not a date in a certain context
Now seriously if the function returns a valid date, you can test afterwards the result to see if it can be something else than a date.
Now i’m not enough expert in regEx to search something more secure than the function I gave previously.
Sorry.
Greetings.
Yves COPPE
yvescoppe at mac.com
> Le 15 oct. 2017 à 20:57, Mark Wieder via use-livecode <use-livecode at lists.runrev.com> a écrit :
>
> On 10/15/2017 11:44 AM, J. Landman Gay via use-livecode wrote:
>> On 10/15/17 5:10 AM, Yves COPPE via use-livecode wrote:
>>> I hope this works for any date format
>> ...
>>>
>>> if matchtext(textToSearch,"(\d{1,2})/(\d{1,2})/(\d{2,4})",theDay,TheMonth,TheYear) is true then
>> Yes, it seems to work with any numeric date now.
>
> It *does* think 99/99/00 is a date, though.
>
> --
> Mark Wieder
> ahsoftware at gmail.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list