search a date

Jan Decroos jan.decroos at groepvanroey.be
Mon Aug 5 10:05:01 CDT 2002


use-revolution at lists.runrev.com writes:
>"(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[12])/([0-9][0-9])"

indeed 
I made an error : should be :

"(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9])"

short explanation

3 fields which are grouped by (), so 3 output variables (theDay,TheMonth and
TheYear)
the '|' means 'OR'
so take the first field : (0[1-9]|[12][0-9]|3[01]) which means 

a valid day (first field) must be a number in one of the three following
formats :
01 -> 09   : 0[1-9]   (a zero followed by a char in the range 1 to 9)
10 -> 29 :   [12][0-9]  (a one or a two, followed by a char in the range 0 to 9)
30 -> 31 : a 3 followed by a 0 or a 1


Hope this helps

Jan




More information about the use-livecode mailing list