Number splitting possible?

jack_shephard's icon

If I have a number, say 91

Is it possible to split it, and have 9 out of one output, and then 1 out another?

Sorry if it's stupidly easy, I can't figure it out :(

Thanks.

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

dividing and modulo:

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

Or regexp:

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

The regexp solution is considerably slower than the direct math solution, and it might be hard to nicely unpack into individual digits.

Tim Lloyd's icon

ahh, it really is slower!