RegEx question

Brian Yennie briany at qldlearning.com
Sat Apr 10 03:28:51 EDT 2004


Your expression below isn't allowing for the leading zero in the first  
item, as it is in the second...

> 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.



More information about the use-livecode mailing list