Regexes in Perl 6
Match Any character
Match digitJust as in PCRE some letters have special meaning if the are following a back-slash: \d means a digit. examples/regex2/match_digit.p6use v6;
my $phone = "054-1234567";
if $phone ~~ m/ \d / {
say "There is a digit";
}
Copyright 2006, 2007, 2008, 2009, 2010 Gabor Szabo http://szabgab.com/ Index | TOC |
Follow me: