In-pattern class
A component of the item:
CLASS |
Description | Complement |
---|---|---|
c | matches character c | |
c-d | matches characters c through d | |
. |
matches any character 1 | |
%a |
matches any letter | %A |
%c |
matches any control character | %C |
%d |
matches any digit | %D |
%g |
matches any printable character but space | %G |
%l |
matches any lowercase letter | %L |
%p |
matches any punctuation character | %P |
%s |
matches any whitespace character | %S |
%u |
matches any uppercase letter | %U |
%w |
matches any alphanumeric character | %W |
%x |
matches any hexadecimal digit | %X |
[xxx] |
matches the union of class(es) xxx |
[^xxx] |
%xxx |
escapes xxx magic character ^$()%.[]*+-? |
Footnotes:
1
See utf8.charpattern
for UTF-8 characters.