my $line = "CCCC--CCCC--CCC(--CC(O"; my $string = "CCC("; if ($line =~ m/\Q$string\E/) {print "match";}