Код: Выделить всё
boost::regex mulRegex(R"rgx(mul\(\d+,\d+\))rgx");
auto mulBegin = boost::sregex_iterator(inputData.begin(), inputData.end(), mulRegex);
bool isMulValid = true;
boost::regex doDontRegex(R"rgx((do(?!n't)|(?
Подробнее здесь: [url]https://stackoverflow.com/questions/79316860/boostmatch-results-is-segfaulting-and-i-cant-figure-out-why[/url]