Match digit
Just as in PCRE some letters have special meaning
if the are following a back-slash:
\d means a digit.
examples/regex2/match_digit.p6
use v6;
my $phone = "054-1234567";
if $phone ~~ m/ \d / {
say "There is a digit";
}
Table of Contents
Comments
In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by
Perl 6 Tricks and Treats newsletter
Register to the free newsletter now, and get updates and news.