my $var = "1 word here another word"; my($head, $tail) = $var =~ /( (?:\w+[ ]?){3} ) [ ] (.*)/x; print "head - [$head]\n"; print "tail - [$tail]\n"; __output__ head - [1 word here] tail - [another word] #### print "yup" if "12 buckle my shoe" =~ /^\d{2}\b/; __output__ yup