Boost logo

Boost :

From: John Maddock (john_maddock_at_[hidden])
Date: 2002-07-27 06:06:20


> ...is demonstrated by the following (debug mode) test:
>
> #include "boost/regex.hpp"
> #include <cassert>
>
> int main()
> {
> boost::regex re("a");
> boost::cmatch match;
> assert(boost::regex_match("", match, re, boost::match_partial));
> }

That's not a bug, it's meant to do that, as the docs say:

"A partial match is one that matched one or more characters at the end of
the text input, but did not match all of the regular expression (although it
may have done so had more input been available). "

In this case there are no characters to match and so there is no partial
match.

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk