finding repeating patterns
jbv
jbv.silences at club-internet.fr
Sat Aug 26 18:23:48 EDT 2006
for those interested, here's something much faster :
on mouseUp
set cursor to watch
lock screen
put fld 1 into myST
put number of chars of myST into n
put "" into myL
set the casesensitive to true
put 1 into k
repeat while k<=1000
repeat with i=100 down to 6
put k+i-1 into b
get char k to b of myST
put myST into a
replace it with "" in a
put ((n - number of chars of a) / b) into c
if c>=2 then
put it & tab & c & cr after myL
add b-1 to k
exit repeat
end if
end repeat
add 1 to k
end repeat
put myL
end mouseUp
More information about the use-livecode
mailing list