Forums > MaxMSP

How to remove positive (+) sign from a number?

August 15, 2011 | 5:38 pm

Just wondering if anyone knows how to remove a positive (+) sign from a float number? e.g +0.47 to 0.47

I’ve been using the "fromsymbol" function to remove the negative (-) sign, but cant seem to find anything to remove positive.

Without removing the (+) sign, number boxes, sliders, etc. wont read the number.

Many thanks!


August 15, 2011 | 5:43 pm

[regexp [+] @substitute 0] will work but there may well be a better way :)


August 15, 2011 | 5:47 pm

Great, thanks Tim.


August 15, 2011 | 6:08 pm

Someday, I may learn regexp, but in the mean time here’s a brute force way:

– Pasted Max Patch, click to expand. –

Where are the + signs coming from, anyway?


August 15, 2011 | 6:38 pm

"Someday, I may learn regexp"

… me too :)


Viewing 5 posts - 1 through 5 (of 5 total)