Hi Da_Elf,
I might repeat myself, but the dictionary is your friend!
About "Wholematches":
...
Specifies whether the lineOffset, wordOffset, and itemOffset functions search only for entire lines, words, or items.
...
No mention of "replace".
Do this:
Code: Select all
on mouseUp
put "22,34,12,1,121,1" into tList
set the wholematches to true
put empty into tNewList
repeat for each item tItem in tList
if itemoffset(tItem,tNewList) = 0 then
put tItem & "," after tNewList
end if
end repeat
delete char -1 of tNewList
answer tNewList
end mouseUp
In LC it is often faster to create a new list than modify an existing list!
Best
Klaus