mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-04 19:31:56 +00:00
escape pattern unless it's prefixed with ~
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user