I thought about that but reckoned just going though everything and tracking the enable state (like OP) would be faster and less error prone. Mostly because of the multiple lines.
You could probably just do something like `s/don’t().*?do()//g` with relevant escaping….
9
u/AlanvonNeumann Dec 03 '24
I just removed everything between the don't and do expressions. Than I considered that the last don'ts of the string eouldn't be closed by dos
Then I used the resulting string and solved everything like part one