basic_regex(); | (1) | (since C++11) |
explicit basic_regex( const CharT* s, flag_type f = std::regex_constants::ECMAScript ); | (2) | (since C++11) |
basic_regex( const CharT* s, std::size_t count, flag_type f = std::regex_constants::ECMAScript ); | (3) | (since C++11) |
basic_regex( const basic_regex& other ); | (4) | (since C++11) |
basic_regex( basic_regex&& other ); | (5) | (since C++11) |
template< class ST, class SA > explicit basic_regex( const std::basic_string<CharT,ST,SA>& str, flag_type f = std::regex_constants::ECMAScript ); | (6) | (since C++11) |
template< class ForwardIt > basic_regex( ForwardIt first, ForwardIt last, flag_type f = std::regex_constants::ECMAScript ); | (7) | (since C++11) |
basic_regex( std::initializer_list<CharT> init, flag_type f = std::regex_constants::ECMAScript ); | (8) | (since C++11) |
Constructs a new regular expression from a sequence of characters interpreted according to the flags f
.
s
.count
characters, pointed to by s
.other
other
using move semantics.str
.[first, last)
.init
.s | - | pointer to a null-terminated string |
count | - | length of a character sequence used to initialize the regex |
first, last | - | range of a character sequence used to initialize the regex |
str | - | a basic_string used as a source used to initialize the regex |
other | - | another regex to use as source to initialize the regex |
init | - | initializer list used to initialize the regex |
f | - | flags used to guide the interpretation of the character sequence as a regular expression |
Type requirements | ||
-ForwardIt must meet the requirements of ForwardIterator . |
std::regex_error
if the supplied regular expression is not valid.noexcept
specification: noexcept
std::regex_error
if the supplied regular expression is not valid.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/regex/basic_regex/basic_regex