Hi list,


I received a few months ago a script from Ken to find a date in a fld


the date is supposed to be in french format :

dd/mm/yyyy


function searchDate textToSearch
local theDay, TheMonth, TheYear -- this is neccesary
put empty into tresult
repeat for each line theLine in textToSearch
if matchtext(theLine,"(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0- 9])",theDay,TheMonth,TheYear) is true then
put theLine & cr after tresult
end if
end repeat
delete last char of tresult
return tresult
end searchDate




BUT
I see in my text, some dates are
dd/mm/yyyy
and other :
 d/mm/yyyy

so first a space then the date of the day then "/" and then 2 digits for the month

as
31/07/2003
and
 1/08/2003

note the space before the 1/08/2003

the function above soesn't retrieve the last foramt of date

can someone adapt this function so that the fucntion retrieve the 2 dates format ???


Thanks.



Greetings.


Yves COPPE
[EMAIL PROTECTED]

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to