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. I also like Ken Ray's solution which lets the engine do the conversion and checks for errors, since that works with long date formats. The advantage to your solution is that it does not recognize a single integer as a date, which could be important in some cases. I think there is a use for both functions depending on the script context.
-- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode