# backslashes my $str = "zipcode: 54935"; if $str ~~ m/ \w+ ':' \s \d+ / { say "Matched '$/'"; }