matchChunk works?

3 messages Options
Embed this post
Permalink
paolo mazza

matchChunk works?

Reply Threaded More More options
Print post
Permalink
On Rev 4.0.0 I tryed matchChunk but even if VAR2 is true the variables
startMatch and endMatch are empty. Why?

See this script:

LOCAL startMatch,
endMatch
on mouseUp
   PUT "tutuytuZXytuyt" into VAR1
   PUT EMPTY INTO
startMatch
   PUT EMPTY INTO endMatch
   PUT matchChunk(VAR1,"ZX",startMatch,
endMatch) INTO VAR2
   put VAR2 && startMatch && endMatch
end mouseUp

Best
regards,

Paolo Mazza


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
BNig

Re: matchChunk works?

Reply Threaded More More options
Print post
Permalink
Paolo,

this will work.

PUT matchChunk(VAR1,"(ZX)",startMatch,endMatch) INTO VAR2

From the documentation:
Comments:
If the regularExpression includes a pair of parentheses, the position of the substring matching the part of the regular expression inside the parentheses is placed in the variables in the positionVarsList and so on.

So it is the parenthesis.

regards
Bernd
paolo mazza

Re: matchChunk works?

Reply Threaded More More options
Print post
Permalink
Thanks a lot.