RegEx question
Yves COPPE
yvescoppe at skynet.be
Fri Apr 9 02:02:12 EDT 2004
Hi,
I have a function to check if a string is a date in European format :
DD/MM/YYYY
function CheckDate pDateToCheck
return
matchText(pDateToCheck,"([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0
-9][0-9][0-9][0-9])")
end CheckDate
when I test :
"12/05/2004" returns " true" this is correct
"05/20/2004" returns "false" this is correct because it's not an
eurpean date format
"5 12/05/2004" returns "true" this is not correct because it's not a
date at all !
Can someone help me to make it run fine ?
Greetings.
Yves COPPE
yvescoppe at skynet.be
More information about the use-livecode
mailing list