Regular expression
    paolo mazza 
    mazzapaoloitaly at gmail.com
       
    Thu Mar 11 10:02:05 EST 2010
    
    
  
Thank you all.
Talking about Regular Expressions, one more question.
If I have more than one string matching the Regex I expect the command
matchChunk returns more than a couple of numbers,
Consider this script:
on mouseUp
   local mySource,myStart,myEnd,TESTO,myStart2,myEnd2
   put "xxxxxx src='HTTPWEB' width='3845' height='334' src='HTTPWEB' xxxxx"
into TESTO
   put empty into mySource
   put empty into myStart
   put empty into myEnd
   put matchChunk(TESTO,"src='([^']*)'",myStart,myEnd,myStart2,myEnd2)
   put myStart & comma & myEnd & comma &  myStart2 & comma & myEnd2
end mouseUp
This script returns "13,19,," .
 I exprected something like "13,19,57,63" , because now I have two strings
matching "src='([^']*)'" .
All the best
Paolo
    
    
More information about the use-livecode
mailing list