Forums > MaxMSP

regexp question

Nov 20 2008 | 11:46 am

hi, i

Nov 20 2008 | 12:13 pm

tells all you need. takes some time to understand, though.

good luck!


Nov 20 2008 | 12:14 pm

On 20 Nov 2008, at 11:46, niki wrote:


> 1:

> ($93
> in
> chips)
> and i want to get "Seat" "1" "AEKARAS"

You’ll need to be more specific – one example doesn’t give enough
information about the format.

But it could be like this:


Possibly with some linebreak-swallowing machinery, bearing in mind
that (i) all regexp implementations are slightly different (I’ve been
using Perl and Java regex more recently than Max) and (ii) my regexp
chops are pretty rusty and (iii) your input syntax isn’t specified; so
consider this a starting point, and do a LOT of testing.

It’s like the old joke: you have a problem, so you come up with a
regexp to solve it. You now have two problems.

Good luck with your gambling application.

— N.

Nick Rothwell / Limited

Nov 20 2008 | 3:06 pm

This regex parses the example that you gave but without knowing more about the task you want to achieve in general it might not help so much.

It looks for the string "". then it returns any characters up until "

Nov 20 2008 | 5:08 pm

thx very much, that worked perfect on the files (it

Nov 20 2008 | 5:16 pm

The [regexp] helpfile and documentation aren’t particularly extensive. I’ve found very helpful, especially the tutorials. The mozilla javascript regex page is also quite good. If all else fails I go trial and error bit by bit through the regex checking that it is returning what i expect it to be at each stage and modifying the re: if it isn’t.


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

Forums > MaxMSP