Forums > MaxMSP

regexp @sustitute and espace

Apr 11 2009 | 12:07 pm


i am trying tu substitute !20 by a space using regexp.

for instance a box message like thad [a!20v] should write in the output this other one [a v]

with this arguments

[[regexp (!20) @substitute \s]]

regexp gives that



Apr 11 2009 | 1:52 pm

You can’t use regexp metacharacters in the substitution string, you need to use the literal characters. So you want something like:

[regexp (!20) @substitute " "]

I’ve just uploaded a patch which aims to explain [regexp] with some examples of how to use it. You might find it helpful, the link is below.


Apr 11 2009 | 2:25 pm

many thanks, lh

your answer has been very helpful


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

Forums > MaxMSP