Reformatting a text file using the text object within Max. Find all and delete

njr26062000's icon

Hi all I need to find a way to take this text file (that I have opened with the text object in Max), and find a way to reformat it so that it deletes and filters out all the "print: " symbols, and then re-export it as a txt file. I find it is quite tricky to get methods right for this that arent very complicated . because Max deals weirdly with "," syntax. for example if I put this all into a coll object it adds a \ where the commas should be

Essentially all i need is a way to 'find and delete' all the "print: " symbols WITHIN max and then be able to save a text file . Obviously I can do this with an external application easily with TextEdit or Google Docs or whatever, but I need this to work inside of Max for a client's ease of use. It needs to instead look like this

6d 19,o 19,u 9d 21,u 5d etc

instead of print: 6d print: 19,0 print: 19,u print: 9d etc

and then have that as a .txt file Anybody have any suggestions?

tyler mazaika's icon

Here's a way, going from one [text] to another. It should be pretty easy to change the output formatting (separate lines or not).

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

njr26062000's icon

Hey, this works perfectly. Thank you so so much!!!