More simple regexp

This commit is contained in:
Xavier Guimard 2018-04-08 22:23:32 +02:00
parent c39bdd0af0
commit 2feb4a40aa

View File

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