forked from Mirrors/freeswitch
escape pattern unless it's prefixed with ~
This commit is contained in:
parent
19a0a0fb00
commit
fe305074f1
|
@ -48,8 +48,11 @@ sub doit($$) {
|
|||
my $loops = shift || 0;
|
||||
my $linematch = 0;
|
||||
|
||||
$pattern =~ s/\(/\\\(/g;
|
||||
$pattern =~ s/\)/\\\)/g;
|
||||
if ($pattern =~ /^\~(.*)/) {
|
||||
$pattern = $1;
|
||||
} else {
|
||||
$pattern = quotemeta $pattern;
|
||||
}
|
||||
|
||||
if ($pattern =~ /^(\d+)$/) {
|
||||
$linematch = 1;
|
||||
|
|
Loading…
Reference in New Issue