my $full_text = "(7001) - This is some text"; if($full_text =~ /\(700[1-3]\) \- This/){ print "full_text hash the check_str\n"; }