You have not said what you are trying to do, or what behavior you expect, so all I can do is make some observations:
The usual way to modify a string is to use the substitution operator s/regexp/replacement/.
In reply to Re: Strange behaviour when regex variable is modified during match?
by Anonymous Monk
in thread Strange behaviour when regex variable is modified during match?
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |