Thanks, that's the "single regex" solution I couldn't see. Sorry I was vague about the requirements; whether the last three or the last n I'm not too worried, just wanted to explore alternative ways to do it.
In reply to Re^4: Removing multiple trailing comment lines from a string
by eyepopslikeamosquito
in thread Removing multiple trailing comment lines from a string
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |