in reply to Problem with input strings that have "[]" brackets
my $line = ' [Category("notestrecord")]'; my $pattern = 'Category("notestrecord")'; if($line =~ /\Q$pattern/) { print "We have a match!"; } else { print "No match!"; } [download]