[Solved] Using regex to replace lowercase

aceslowman's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I am working on a patch that will accept a large text file (1000+ words), strip out everything other than the words, and convert all uppercase to lowercase. So far I have been using regex, which has worked well, but I'm hitting a wall when I'm trying to convert to lowercase. PCRE doesn't support \L, so I can't substitute \L$1$2, and previous examples I've seen, using atoi or javascript, end up crashing Max due to the size of the list. Does anyone have any tips?

breton.txt
txt
broc's icon
Max Patch
Copy patch and select New From Clipboard in Max.

This may be helpful.

aceslowman's icon

And that did it! Thanks for reminding me of iter, I knew there was something like that that I was forgetting about. Thank you!

Grégoire Lorieux's icon

Hi there, I'd like to share this one. I've tried to use regexp but it works fine with atoi > iter > split 65 90 > + 32 > zl group > itoa. This patch here removes also french accents. best wishes - g

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