Boost-Supported RegEx Character Classes
The following character class names are always supported by Boost.Regex:
Name | POSIX-standard name | Description | Example |
---|---|---|---|
[: alnum :] | Yes | Alpha-numeric characters | [A-Za-z0-9] |
[:alpha:] | Yes | Alphabetic characters | [A-Za-z] |
[: blank:] | Yes | Whitespace characters that are not line separators | space or tab |
[: cntrl:] | Yes | Control characters | Any character not part of the character classes: [:upper:], [:lower:], [:alpha:], [:digit:], [:punct:], [:graph:], [:print:], [:xdigit:] |
[: d:] | No | Decimal digits | [0-9] |
[:digit:] | Yes | Decimal digits | [0-9] |
[:graph:] | Yes | Characters with graphic representations | [A-Z][a-z][0-9][:punct:] |
[: l:] | No | Lower case characters | [a-z] |
[: lower:] | Yes | Lower case characters | [a-z] |
[: print:] | Yes | Characters that display when printed | [:graph:] and space |
[:punct:] | Yes | Punctuation characters | ! ' # S % & ' ( ) * + , - . / : ; < = > ? @ [ / ] ^ _ { | } ~ |
[:s:] | No | Whitespace characters | tab, new line, vertical tab, form feed, carriage return, space |
[:space:] | Yes | Whitespace characters | tab, new line, vertical tab, form feed, carriage return, space |
[:unicode:] | No | Extended characters whose code point value is above 255 | Unicode® character specific information |
[:u:] | No | Upper case characters | [A-Z] |
[:upper:] | Yes | Upper case characters | [A-Z] |
[:w:] | No | Alphanumeric characters and underscore | [A-Za-z0-9_] |
[: word:] | No | Alphanumeric characters and underscore | [A-Za-z0-9_] |
[:xdigit:] | Yes | Hexadecimal digit characters | [A-Fa-f0-9] |