creating strings without commas not followed by a space

coralie's icon

Hi,

I have looked almost everywhere on the forum and couldn't find a solution: I need to construct a message for a [dict] with latitude and longitude coordinates. The tricky thing is that those coordinates have to be expressed as follows:

float,float

No space between the two floats.
So far, I have used [combine] and I have managed to get:
float\,float
I had never heard of [regexp] until now. I am not sure there is a way to have those \ removed.

Another way would be using a [tosymbol], but the commas disappear. Addtionnally, [sprintf] systematically adds spaces after commas.
Precision: the message has to be structured as follows:
set url::httpblablabla/float,float

thanks to anyone who would have a better idea…

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

This works fine for me:

coralie's icon

Thanks Jeremy

I get the same result, but the problem is the backslash. It should be removed.

Coralie

Jeremy's icon

The backslash is only present in the message box and is necessary. Otherwise Max thinks you are sending 2 messages. It's an escape character for the comma. "this\,is\,one\,message" and "this,is,four,messages".