Forums > MaxMSP

Problems with regex

Feb 27 2014 | 11:56 am

I’m having problems with regexp object. I’m trying to use it just to filter messages starting with /accxyz, but somehow it is changing the content of the string. Check the following patch, A and B seem to be the same, but when I process those strings with the zl slice operator, it produces different result in each situation.

— Pasted Max Patch, click to expand. —


Feb 27 2014 | 12:08 pm

I just realized I can simply use the route object to do what I want. Anyway, the question about the regex object still puzzles me.

Feb 27 2014 | 12:51 pm

It’s because regexp outputs your list as a symbol. [fromsymbol] changes it back to a list and works as expected when sent to zl.slice.

-- Pasted Max Patch, click to expand. --


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

Forums > MaxMSP