id summary reporter owner description type status milestone component version severity resolution keywords cc 4837 referencing subexpr matches via names asserts nis.aggarwal@… John Maddock "I am using named subexpressions. The regex pattern constructs fine and the matching works fine too but when I try to index into the match_results object using the name, an assertion is thrown. {{{ #include #include #include #include using namespace boost; int main() { std::string str = ""for is while""; regex pat(""(?\\b(for|while)\\b)""); sregex_iterator match_iter(str.begin(), str.end(), pat); sregex_iterator match_end; for (; match_iter != match_end; ++match_iter) { smatch match = (*match_iter); ssub_match keywordMatch = match[""keyword""]; if (keywordMatch.matched) { printf(""matched a keyword!\n""); } size_t pos = (*match_iter).position((size_t)0); size_t len = (*match_iter)[0].second - (*match_iter)[0].first; std::cout << pos << "","" << len << std::endl; } return 0; } }}} " Bugs closed To Be Determined regex Boost 1.40.0 Showstopper worksforme regex named subexpression