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 $loops = shift || 0;
|
||||||
my $linematch = 0;
|
my $linematch = 0;
|
||||||
|
|
||||||
$pattern =~ s/\(/\\\(/g;
|
if ($pattern =~ /^\~(.*)/) {
|
||||||
$pattern =~ s/\)/\\\)/g;
|
$pattern = $1;
|
||||||
|
} else {
|
||||||
|
$pattern = quotemeta $pattern;
|
||||||
|
}
|
||||||
|
|
||||||
if ($pattern =~ /^(\d+)$/) {
|
if ($pattern =~ /^(\d+)$/) {
|
||||||
$linematch = 1;
|
$linematch = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user