I am trying to use named back-references in Boost. I tried this, but it is not working. Any ideas what I am missing?
boost::regex re("(\d*.\d*\k<name>)")
string_regex_iterator regexItr(
str.begin(),
str.end(),
re,
boost::match_default | boost::match_partial);
That regex has two unnamed capture groups, one nested within the other, and a back-reference (“\k<name>”) to a named capture group called “name”, which doesn’t exist.
Also, you’re escaping the
\before thek, but not before thed.