I have to strip some XML tags from the text and leave their values.
Example
text text <tag>tag_value</tag> text text <a href="example.com">example.com</a>
->
text text tag_value text text example.com
So far, I've used boost_replace but now I am not able to use that library.
std::string src(text);
std::string fmt ="";
std::string ex = "(<tag attribute=\"(.*?)\">)|(</tag>)|(<a href(.*?)\">)|(</a>)|(<tag>)|(</tag>))";
boost::regex expr(ex);
std::string s2 = boost::regex_replace(src, expr, fmt, boost::match_default | boost::format_all);
How could I solve that problem? What library could help me do that? Thanks