... it depends of new line.
My latest update of Re: RegExp: pos management in global substitution handles the multi-line example of the OP (Update: which I didn't at first realize was a multi-line example).
In reply to Re^3: RegExp: pos management in global substitution
by AnomalousMonk
in thread RegExp: pos management in global substitution
by OlegG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |