basic_regex();
|
(1) | (C++11 起) |
explicit basic_regex( const CharT* s,
flag_type f = std::regex_constants::ECMAScript ); |
(2) | (C++11 起) |
basic_regex( const CharT* s, std::size_t count,
flag_type f = std::regex_constants::ECMAScript ); |
(3) | (C++11 起) |
basic_regex( const basic_regex& other );
|
(4) | (C++11 起) |
basic_regex( basic_regex&& other ) noexcept;
|
(5) | (C++11 起) |
template< class ST, class SA >
explicit basic_regex( const std::basic_string<CharT,ST,SA>& str, |
(6) | (C++11 起) |
template< class ForwardIt >
basic_regex( ForwardIt first, ForwardIt last, |
(7) | (C++11 起) |
basic_regex( std::initializer_list<CharT> init,
flag_type f = std::regex_constants::ECMAScript ); |
(8) | (C++11 起) |
从按照标志 f
转译的字符序列构造新的正则表达式。
s
构造正则表达式。s
所指向的 count
个的字符序列构造正则表达式。other
构造正则表达式。other
内容的正则表达式。str
构造正则表达式。[first, last)
内容的正则表达式。init
内容的正则表达式。s | - | 指向空终止字符串的指针 |
count | - | 用于初始化 regex 的字符序列长度 |
first, last | - | 用于初始化 regex 的字符序列范围 |
str | - | 用作源初始化 regex 的 basic_string |
other | - | 用作源初始化 regex 的另一 regex |
init | - | 用于初始化 regex 的 initializer_list |
f | - | 用于指引转译字符序列为正则表达式的标志 |
类型要求 | ||
-
ForwardIt 必须满足 ForwardIterator 的要求。
|