请教boost中的regex_replace怎么使用,参数太多,不明白

请问boost中的regex_replace如何使用,参数太多,不明白
能给例子者得分.

比如将下面字符串中的j字母全换成-
string   s= "lskfjwoerijwlfkjsdfklskjfweortkewlrkwjfl ";

------解决方案--------------------
Boost.Regex
Algorithm regex_replace

Boost.Regex Index
Contents

Synopsis
Description
Examples

Synopsis

#include <boost/regex.hpp>

The algorithm regex_replace searches through a string finding all the matches to the regular expression: for each match it then calls match_results::format to format the string and sends the result to the output iterator. Sections of text that do not match are copied to the output unchanged only if the flags parameter does not have the flag format_no_copy set. If the flag format_first_only is set then only the first occurrence is replaced rather than all occurrences.

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 basic_string <charT> & fmt,
match_flag_type flags = match_default);

template <class traits, class charT>
basic_string <charT> regex_replace(const basic_string <charT> & s,
const basic_regex <charT, traits> & e,
const basic_string <charT> & fmt,
match_flag_type flags = match_default);


Description

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 basic_string <charT> & fmt,
match_flag_type flags = match_default);

Enumerates all the occurences of expression e in the sequence [first, last), replacing each occurence with the string that results by merging the match found with the format string fmt, and copies the resulting string to out.

If the flag format_no_copy is set in flags then unmatched sections of text are not copied to output.

If the flag format_first_only is set in flags then only the first occurence of e is replaced.

The manner in which the format string fmt is interpretted, along with the rules used for finding matches, are determined by the flags set in flags

Effects: Constructs an regex_iterator object:

regex_iterator <BidirectionalIterator, charT, traits, Allocator>
i(first, last, e, flags),

and uses i to enumerate through all of the matches m of type match_results <BidirectionalIterator> that occur within the sequence [first, last).

If no such matches are found and

!(flags & format_no_copy)

then calls

std::copy(first, last, out).

Otherwise, for each match found, if

!(flags & format_no_copy)

calls

std::copy(m.prefix().first, m.prefix().last, out),

and then calls

m.format(out, fmt, flags).

Finally if

!(flags & format_no_copy)

calls

std::copy(last_m.suffix().first, last_m,suffix().last, out)

where last_m is a copy of the last match found.