Removing space in message while keeping leading 0

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

I'm trying to remove the space that is front of a number while still keeping the 0 that is prefixed when the number is 9 or less. I've tried sprintf, combine, and regex but they strip the 0 from the beginning of the digit.
Any ideas?

mzed's icon

What space are you talking about?

albab's icon

In the patch I pasted, if you click the output message, there is a space right before the digits, just one. I need the 0 in front of the digit (I know Max doesn't like 0's leading integers so I'm using the sprintf to get around that), but it's leaving a space in the first index.

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

That space is in your sprintf object. This should work: