RegEx for a date

Yves Coppé yvescoppe at skynet.be
Fri Dec 20 16:39:01 EST 2002


Hi,


I want to check if a line of a data is a date in European format : DD/MM/YYYY


so I write


  local theDay, TheMonth, TheYear

  repeat for each line theLine in uneAnalyse
           if 
(theLine,"(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9][0-9][0-9])",theDay,TheMonth,TheYear) 
is true then
              put theLine into tDate
             exit repeat
           end if
  end repeat


but it doesn't work...

Can someone help me please ???

I think I write wrong for the "year" variable.

Thanks.
-- 
Greetings.

Yves COPPE

Email : yvescoppe at skynet.be



More information about the use-livecode mailing list