how to use replace_regex_copy() from boost::algorithm library?
        Posted  
        
            by Vincenzo
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Vincenzo
        
        
        
        Published on 2010-05-13T07:52:27Z
        Indexed on 
            2010/05/13
            7:54 UTC
        
        
        Read the original article
        Hit count: 202
        
This is my code:
#include <string>
#include <boost/algorithm/string/regex.hpp>
string f(const string& s) {
      using namespace boost::algorithm;
      return replace_regex_copy(s, "\\w", "?");
}
This is what compiler says:
no matching function for call to ‘replace_regex_copy(const
std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&, std::string, std::string)
The link to the library: http://www.boost.org/doc/libs/1_43_0/doc/html/boost/algorithm/replace_regex_copy.html
Could anyone please help? Thanks!
ps. Boost library is in place, since other functions from it work fine.
© Stack Overflow or respective owner