diff --git a/support-d/utils/hashfinder b/support-d/utils/hashfinder index f6ec9df3e4..88df4ce5cc 100755 --- a/support-d/utils/hashfinder +++ b/support-d/utils/hashfinder @@ -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;