Forums > MaxMSP

Isolate String from Large Text

January 30, 2013 | 10:10 pm

Hi.

I would like to know how I can isolate a specific string that I want from a large incoming text. Also, can I take a string between two points inside the text (i.e. point 1 on start of line 10, and point 2 on end of line 10)?
Or how can I isolate a specific line from the text (disregard everything except line 10)?

Thanks


January 30, 2013 | 11:08 pm

jit.textfile will happily provide a lot of the functionality you’re asking for. I’d use it to locate the specific lines, then atoi/regexp or similar to chop the line.


January 31, 2013 | 12:02 pm

Thanks Wetterberg for the response. I have looked around and tried a few things, but can’t find the correct configuration.

Can you post an example (or anyone who like to share please)?


January 31, 2013 | 1:39 pm

Alright, solved.

Well the problem was that my text was formatted as a table structure, and had to change that to process it as a list and text.

I then used simple zl, sprintf, and route to get the values I wanted.


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