September 2017
Beginner
402 pages
9h 52m
English
Regexes in Perl 6 include some predefined subrules, which are also character classes and partially intersect with the backslashed character classes. Syntactically, subrules are the names in angle brackets. The following table summarizes them:
| Subrule | Meaning |
| <alpha> | Alphabetical symbols and _ |
| <alnum> | Same as \w |
| <digit> | Same as \d |
| <lower> | Lowercase characters |
| <upper> | Uppercase characters |
| <space> | Whitespace, same as \s |
| <blank> | Horizontal space, same as \h |
| <cntrl> | Control characters |
| <punct> | Punctuation |
| <graph> | Same as <alnum> + <punct> |
| <print> | Printable characters, same as <alnum> + <space> without <punct> |
Predefined subrules are a valid part of regexes in Perl 6 and can be used in any place ...
Read now
Unlock full access