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