my $title = q(the 2000); if ($title =~/^the\s(\s*?)\d{4}$/i) { print "\ntrigger1\n" } if ($title =~/^the\s(\s*?)\d{4}$/i) { print "\ntrigger2\n" }