Skip to content

Posix character classes

pmagwene edited this page Nov 15, 2011 · 1 revision

POSIX character classes:

[:digit:] 	Only the digits 0 to 9
[:alnum:] 	Any alphanumeric character 0 to 9 OR A to Z or a to z.
[:alpha:] 	Any alpha character A to Z or a to z.
[:blank:] 	Space and TAB characters only.
[:xdigit:] 	Hexadecimal notation 0-9, A-F, a-f.
[:punct:] 	Punctuation symbols . , " ' ? ! ; : # $ % & ( ) * + - / < > = @ [ ] \ ^ _ { } | ~
[:print:] 	Any printable character.
[:space:] 	Any whitespace characters (space, tab, NL, FF, VT, CR). Many system abbreviate as \s.
[:graph:] 	Exclude whitespace (SPACE, TAB). Many system abbreviate as \W.
[:upper:] 	Any alpha character A to Z.
[:lower:] 	Any alpha character a to z.
[:cntrl:] 	Control Characters NL CR LF TAB VT FF NUL SOH STX EXT EOT ENQ ACK SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC IS1 IS2 IS3 IS4 DEL.

Clone this wiki locally