delete space in a list

akee-rf's icon

Hello,

how to turn a list like 1 2 3 4 to 1234 ?

the number of strings in the list will nbe random between 1 and 8.

example: it can be 1 3 to 13 or 1 2 3 4 5 6 7 to 1234567

thanks

o s's icon

if you can make the strings the same length you can use [sprintf]...

Max Patch
Copy patch and select New From Clipboard in Max.

hth ole

akee-rf's icon

that's the thing the strings aer never the same length.

bkshepard's icon
Max Patch
Copy patch and select New From Clipboard in Max.

[regexp] will do this for you.

akee-rf's icon

YES! so easy :)

thank you

Roman Thilenius's icon

if 8 is really the maximum [sprintf %s%s%s%s%s%s%s%s] should also work for "1 2 3 4 5".

if 8 is really the maximum and it is only about numbers between 0 and 9, there is also a
simple solution using plain math. :)

-110

Emmanuel Jourdan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

a math solution, just for fun.

akee-rf's icon

Nice one!

akee-rf's icon

@bkshepard

Max Patch
Copy patch and select New From Clipboard in Max.

by the way, is it possible to have {regexp} still working if you gave him just one string?
this is the way i do it for now..

ygreq's icon

It seems that none of the solutions work with a longer list like this one (made up of 64 ints):
0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Any ideas?
Thank you

Rick's icon
Max Patch
Copy patch and select New From Clipboard in Max.