in reply to how can I combine these expressions?
If you could post some working code with sample data, I could work on something better. I tried playing with your code and couldn't really get a good feel for what you were doing.$valid = "(?:[_a-zA-Z]\w*)"; $str =~ s/(^|[^\%](?:\%\%)*)\%($valid|\{$valid\}))/"$1".$env->{$2}/ge;
Cheers,
Ovid
|
|---|