regexp to remove trailing whitespace

Dan Nigrin's icon

See patch below - trying to use regexp to remove trailing whitespace from a symbol. I searched online and found the expression I used in the example, but it's throwing an error, and also not working. Any help greatly appreciated!

Max Patch
Copy patch and select New From Clipboard in Max.

Roman Thilenius's icon

in case nothing better comes up: both [sprintf %s] and [fromsymbol] should do it, too.

Dan Nigrin's icon

Great idea, thanks Roman!

kLSDiz's icon

not better, but more regexy

Max Patch
Copy patch and select New From Clipboard in Max.

Dan Nigrin's icon

Awesome, thanks KLSDIZ!