template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class ST, class SA> OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, const basic_string<charT, ST, SA>& fmt, regex_constants::match_flag_type flags = regex_constants::match_default); template <class OutputIterator, class BidirectionalIterator, class traits, class charT> OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, const charT* fmt, regex_constants::match_flag_type flags = regex_constants::match_default);
-1- Effects: Constructs a
-2- Returns:regex_iterator
objecti
as if byregex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags)
, and usesi
to enumerate through all of the matchesm
of typematch_results<BidirectionalIterator>
that occur within the sequence[first, last)
. If no such matches are found and!(flags & regex_constants ::format_no_copy)
then callsout =std::copy(first, last, out)
. If any matches are found then, for each such match, if!(flags & regex_constants::format_no_copy)
, callsout =std::copy(m.prefix().first, m.prefix().second, out)
, and then callsout =m.format(out, fmt, flags)
for the first form of the function andout =m.format(out, fmt, fmt + char_traits<charT>::length(fmt), flags)
for the second. Finally, if such a match is found and!(flags & regex_constants ::format_no_copy)
, callsout =std::copy(last_m.suffix().first, last_m.suffix().second, out)
wherelast_m
is a copy of the last match found. Ifflags & regex_constants::format_first_only
is non-zero then only the first match found is replaced.out
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4