September 2017
Beginner
402 pages
9h 52m
English
The \w character class matches with a character that can be part of a word, namely, with letters, digits, and the underscore symbol. The \W matches with all the rest. Letters are understood here in the Unicode sense—these are the characters from the Letter category.
For example, \w will always match with any Greek letter:
$ perl6 -e'say "OK" if "λ" ~~ /\w/'OK
As with digits, which we covered in the previous section, you have to be prepared that \w will match with many more characters that you may expect based on the languages you are familiar with.