Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-11-11 07:07:36


Steve,

>I'd love to :)

OK the cvs source is updated with tentative support for partial matches,
this is not yet documented (I want to verify that it works OK first!), but
roughly:

There is a new match_flag call "match_partial" that can be passed on its
own or in combination with other match_flags to
regex_match/regex_search/regex_grep. You can not use it with
regex_split/regex_merge as these will get seriously confused over partial
matches.
You can spot that a match is partial by examining the information filled in
in the match_results struct, for a partial match then:

match_results[0].matched == false
match_results[0].first = start of partial match
match_results[0].second = undefined

Otherwise partial matches fulfil the leftmost longest rule, except that
unmatched sub-expressions do not partisipate in deciding the best match.
Note that full matches are always prefered to partial matches, even if a
longer partial match is possible.

- John.


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