std::basic_regex

From Cppreference

Jump to: navigation, search
Defined in header <regex>

template<

    class CharT = char,
    class Traits = std::regex_traits<CharT>

> class basic_regex;
(C++11 feature)

The class template basic_regex provides a general framework for holding regular expressions.

Several specializations for common character types are provided:

Defined in header <regex>
Type Definition
regex basic_regex<char>
wregex basic_regex<wchar_t>

Contents

[edit] Member types

Member type Definition
value_type CharT
traits_type Traits
string_type Traits::string_type
locale_type Traits::locale_type
flag_type std::regex_constants::syntax_option_type

[edit] Member functions

(constructor)
constructs the regex object
(public member function)
(destructor)
destructs the regex object
(public member function)
operator=
assigns the contents
(public member function)
assign
assigns the contents
(public member function)
Observers
mark_count
returns the number of marked sub-expressions within the regular expression
(public member function)
flags
returns the syntax flags
(public member function)
Locale
getloc
get locale information
(public member function)
imbue
set locale information
(public member function)
Modifiers
swap
swaps the contents
(public member function)