[regex] boost::match_any
Hi. Content = "abcab", expression = "a{1, 2}b?c" + "a{1, 2}b?c" (doubled pattern). I think the expression can be simplified even more. As you can see, there's only partial match, and boost::regex_search(content, m, expression, boost::match_partial); detects it. But boost::regex_search(content, m, expression, boost::match_partial | boost::match_any); doesn't detect it. I expected that boost::match_any doesn't affect the main result (found or not), but just can return different sub-results (where and what found). Can you please explain where I'm wrong? Environment: VC 8.0, boost 1.33.1. Best regards, Andriy Tylychko, mailto:telya@mail.ru telya@mail.ru
Andriy Tylychko (mail.ru) wrote:
boost::regex_search(content, m, expression, boost::match_partial);
detects it. But
boost::regex_search(content, m, expression, boost::match_partial | boost::match_any);
doesn't detect it. I expected that boost::match_any doesn't affect the main result (found or not), but just can return different sub-results (where and what found). Can you please explain where I'm wrong?
Works for me with current cvs (effectively 1.34), and I don't remember fixing a related bug, so <shrug> I guess ? BTW match_any doesn't really have any positive effect any more, so I suggest you just drop it's useage. HTH, John.
participants (2)
-
Andriy Tylychko (mail.ru)
-
John Maddock