Thanks for your reply. I have updated the OP with some sample input, which is, as you see, rather simple. I realised that the capturing the $ and then removing it is a bit silly, but when I moved the $ out of the capturing brackets, the match failed, so obvioulsy I have to escape the $ in some other way. You are right of course about not then needing two variables, one with the $ and one without.
In reply to Re^2: Replacing environment variables
by loris
in thread Replacing environment variables
by loris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |