30 Regular expressions library [re]

30.7 Class template basic_­regex [re.regex]

30.7.3 Assignment [re.regex.assign]

basic_regex& operator=(const basic_regex& e);
Postconditions: flags() and mark_­count() return e.flags() and e.mark_­count(), respectively.
basic_regex& operator=(basic_regex&& e) noexcept;
Postconditions: flags() and mark_­count() return the values that e.flags() and e.mark_­count(), respectively, had before assignment.
e is in a valid state with unspecified value.
basic_regex& operator=(const charT* p);
Effects: Equivalent to: return assign(p);
basic_regex& operator=(initializer_list<charT> il);
Effects: Equivalent to: return assign(il.begin(), il.end());
template<class ST, class SA> basic_regex& operator=(const basic_string<charT, ST, SA>& s);
Effects: Equivalent to: return assign(s);
basic_regex& assign(const basic_regex& e);
Effects: Equivalent to: return *this = e;
basic_regex& assign(basic_regex&& e) noexcept;
Effects: Equivalent to: return *this = std​::​move(e);
basic_regex& assign(const charT* p, flag_type f = regex_constants::ECMAScript);
Effects: Equivalent to: return assign(string_­type(p), f);
basic_regex& assign(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript);
Effects: Equivalent to: return assign(string_­type(p, len), f);
template<class ST, class SA> basic_regex& assign(const basic_string<charT, ST, SA>& s, flag_type f = regex_constants::ECMAScript);
Returns: *this.
Effects: Assigns the regular expression contained in the string s, interpreted according the flags specified in f.
If an exception is thrown, *this is unchanged.
Postconditions: If no exception is thrown, flags() returns f and mark_­count() returns the number of marked sub-expressions within the expression.
Throws: regex_­error if s is not a valid regular expression.
template<class InputIterator> basic_regex& assign(InputIterator first, InputIterator last, flag_type f = regex_constants::ECMAScript);
Effects: Equivalent to: return assign(string_­type(first, last), f);
basic_regex& assign(initializer_list<charT> il, flag_type f = regex_constants::ECMAScript);
Effects: Equivalent to: return assign(il.begin(), il.end(), f);