boost::algorithm::replace_regex_copy — 正则表达式替换算法。
// In header: <boost/algorithm/string/regex.hpp> template<typename OutputIteratorT, typename RangeT, typename CharT, typename RegexTraitsT, typename FormatStringTraitsT, typename FormatStringAllocatorT> OutputIteratorT replace_regex_copy(OutputIteratorT Output, const RangeT & Input, const basic_regex< CharT, RegexTraitsT > & Rx, const std::basic_string< CharT, FormatStringTraitsT, FormatStringAllocatorT > & Format, match_flag_type Flags = match_default|format_default); template<typename SequenceT, typename CharT, typename RegexTraitsT, typename FormatStringTraitsT, typename FormatStringAllocatorT> SequenceT replace_regex_copy(const SequenceT & Input, const basic_regex< CharT, RegexTraitsT > & Rx, const std::basic_string< CharT, FormatStringTraitsT, FormatStringAllocatorT > & Format, match_flag_type Flags = match_default|format_default);