I'm trying to convert a string to a regex, string looks like so:
std::string term = "apples oranges"; and I wanted the regex to be term with all spaces replaced by any character and any length of characters and I thought that this might work:
boost::replace_all(term , " " , "[.*]"); std::regex rgx(s_term); so in std::regex_search term would return true when looking at:
std::string term = "apples pears oranges"; but its not working out, how do you do this properly?