public member function
<regex>

std::regex_traits::lookup_classname

template <class ForwardIterator>  char_class_type lookup_classname ( ForwardIterator first, ForwardIterator last,                                     bool nocase = false ) const;
Return character class mask
Returns a bitmask value that selects the character class identified by the character sequence between first and last.

The returned value can be used as argument for member function regex_traits::isctype to identify the type of a character.

This function is called when a potential named class name is encountered in a regular expression to obtain the value to be used in subsequent calls to isctype in order to match characters. nocase is set to true if the regex object has icase as a syntax option.

For the char and wchar_t specializations of the standard regex_traits, at least the following names are supported:
name*class descriptionequivalent check in default locale
alnumalpha-numerical characterisalnum
alphaalphabetic characterisalpha
blankblank characterisblank
cntrlcontrol characteriscntrl
digitdecimal digit characterisdigit
graphcharacter with graphical representationisgraph
lowerlowercase letterislower
printprintable characterisprint
punctpunctuation mark characterispunct
spacewhitespace characterisspace
upperuppercase letterisupper
xdigithexadecimal digit characterisxdigit
ddecimal digit characterisdigit
wword characterisalnum
swhitespace characterisspace
* The name is matched without regard to the case of the characters used in the character sequence.

Parameters

first, last
Forward iterators to the initial and final positions in a sequence of characters.
Case insensitive.
The range used is [first,last), which includes all the characters between first and last, including the character pointed by first but not the character pointed by last.
nocase
If true, the returned bitmask is suitable to match characters without regard to their case.

Return value

A bitmask value to select the specified character class.
If the character sequence does not name a supported character class, it returns a value that compares equal to 0.
If the character sequence does not name a supported character class, it returns char_class_type().
char_class_type is a member type, defined as a bitmask type used to identify character classes.
A bitmask type may have been implemented in your library either as an enumerated type, an integer type, or a bitset. In any case, it can take one or more flags of that same type as value by combining them using the bitwise OR operator (|).

See also