is there a way to replace multiple items in coll row with a single message

Jonathan Hallstrom's icon

Is there any way to replace multiple index points in a coll row with one message?
lets say I have 0 0 1 01 1 02 1 0 3 1 in a single coll line and I want to replace every 3rd number with a new number. from what I can tell nsub only works on one index point at a time. Is there any way to do all the replacing in one message?

Floating Point's icon

you could have multiple nsub messages in the same message box separated by commas:
(nsub $1 $2 $3, nsub $4 $5 $6, nsub $7 $8 $9)

or for more flexible options use javascript

ygreq's icon

or take them out of coll, use zl and put them back on the same coll or another.