From: Eric Niebler (eric_at_[hidden])
Date: 2006-11-03 12:23:44
John Maddock wrote:
> Luc LA. ALQUIER wrote:
>> match_extra Instructs the matching engine to retain all available
>> HYPERLINK "http://www.boost.org/libs/regex/doc/captures.html"capture
>> information; if a capturing group is repeated then information about
>> every repeat is available via HYPERLINK
>> or HYPERLINK
>> This feature was for me THE great feature that can provide a great
>> way to link related information together.
>> But the behavior using this flag with search (algorithm) was not the
>> one expected (for me).
> Nod: understood. However there are a couple of problems here:
> 1) The underlying engine has no knowledge of whether one capturing group is
> embedded "inside" another. This pretty much rules out tree-like structures
> without a major rewrite.
You might look into xpressive, a new regex engine that will be part of
Boost 1.34. With xpressive, you can build grammars out of regexes, and
the results of matching such a grammar is a tree of results.
You can read about xpressive's regex grammars and nested results here:
The code lives here:
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk