If you use boost::regex, don’t do what I just did.
- Calling boost::regex_match(std::string&,match_results&,basic_regex&)
- Changing the std::string that was passed to regex_match.
- Trying to look at the sub-matches in the match_results object.
I didn’t realize that match_results kept references to the string, and so you can’t edit the string.
Perhaps that will save someone from hitting an assert().