Hi All,
I have to find the date in a text. If I use this Regular Expression,
it finds the date (returns true) but it returns just the first chars
of the date..

on mouseUp
   put "sfgsfg gsfgs g 05/01/2011 t trtr" into FULLTEXT
   put "((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2}))" into MYSTRYNG
   put matchText(FULLTEXT,MYSTRYNG,VAR0) into MYRESULT
   put matchChunk(FULLTEXT,MYSTRYNG,VAR1, VAR2) into MYRESULT2
   put MYRESULT && MYRESULT2 && VAR0 && VAR1 && VAR2
end mouseUp

It returns  "true true 05 16 17" instead of "true true 05/01/2011 16 25"


then if I change the text to search ...

on mouseUp
   put "sfgsfg gsfgs g 4/1/2011 t trtr" into FULLTEXT
   put "((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2}))" into MYSTRYNG
   put matchText(FULLTEXT,MYSTRYNG,VAR0) into MYRESULT
   put matchChunk(FULLTEXT,MYSTRYNG,VAR1, VAR2) into MYRESULT2
   put MYRESULT && MYRESULT2 && VAR0 && VAR1 && VAR2
end mouseUp

It returns  "true true 4 16 16" instead of "true true 4/1/2011 16 24"


Why ? Any idea?

All the best,

Paolo Mazza

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to