Instead of [^\$]* for the character class, I would think about using [^}]* instead. The reason is demonstrated by Abigail-II's post. If there is more than one '}' on any given line in your input file, then your regular expression will gobble everything up until the last one. using [^}] will make it stop at the first '}' character it finds.
In reply to Re: Translating Env Variables
by revdiablo
in thread Translating Env Variables
by moshefr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |