Better regexp (#976)

This commit is contained in:
Xavier Guimard 2016-03-13 12:42:58 +00:00
parent afc48e45e5
commit d6a4461416

View File

@ -456,8 +456,7 @@ sub substitute {
$expr =~ s/\$ip\b/&remote_ip/sg;
# substitute vars with session datas, excepts special vars $_ and $\d+
$expr =~ s/\$(_*[a-zA-Z]\w*)/\$datas->{$1}/sg;
$expr =~ s/\$datas->{ENV}/\$ENV/sg;
$expr =~ s/\$(?!ENV)(_*[a-zA-Z]\w*)/\$datas->{$1}/sg;
return $expr;
}