RegEx question

Yves COPPE yvescoppe at skynet.be
Sat Apr 10 03:22:18 EDT 2004


Hi Dar

>
> This works for me with your original examples.
>
> Might your data sometimes have spaces or LF at the start or end?  The  
> regex will need to account for that.
>
> Dar Scott
>
>


Try this :

09/10/2004 is a valid date in French


on mouseup
   ask "Une date ?" with "09/10/2004"
   if it is empty then exit to top
   answer CheckDate(it)
end mouseup

function CheckDate pDateToCheck
   return  
matchText(pDateToCheck,"\A([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0 
-9][0-9][0-9][0-9])\z")
end CheckDate


it returns "false" and shoulf return "true"....

Thanks for more help.


Greetings.

Yves COPPE
yvescoppe at skynet.be



More information about the use-livecode mailing list