## delete space in a list

May 16 2011 | 5:50 pm
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

• May 16 2011 | 6:16 pm
if you can make the strings the same length you can use [sprintf]...
hth ole
• May 16 2011 | 6:37 pm
that's the thing the strings aer never the same length.
• May 16 2011 | 6:54 pm
[regexp] will do this for you.
• May 16 2011 | 6:57 pm
YES! so easy :)
thank you
• May 17 2011 | 6:18 am
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
• May 17 2011 | 2:05 pm
a math solution, just for fun.
• May 19 2011 | 10:28 am
Nice one!
• May 19 2011 | 10:34 am
@bkshepard
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..
• Apr 22 2015 | 7:54 am
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
• Apr 22 2015 | 1:52 pm