Boost logo

Boost :

From: Lorenzo Bettini (bettini_at_[hidden])
Date: 2007-04-28 14:41:08


Eric Niebler wrote:
> Lorenzo Bettini wrote:
>> Eric Niebler wrote:
>>> John Maddock wrote:
>>>> Lorenzo Bettini wrote:
>>>>> Hi
>>>>>
>>>>> is there any plan to support more than 9 back references in the regex
>>>>> library?
>>>> You can have as many marked sub-expressions as you want, and refer to them
>>>> in the match_results structure once you have a match. What you can't do at
>>>> present is have a true back-reference say \12 in your expression.
>>> You could use xpressive, which handles this case.
>> OK, thanks, I'll take a look at it... is xpressive compatible with
>> boost::regex expressions?
>
> Boost.Regex and Boost.Xpressive accept the same basic regex syntax.
> Xpressive doesn't yet support collating elements (eg., [.ae.]) and
> equivalence classes (eg., [=a=]).

OK, thanks... probably I wouldn't need these features at the moment...

by the way, I use regular expressions for this
http://www.gnu.org/software/src-highlite

>
> I should also say that as a result of your inquiry, I found an
> off-by-one error in Xpressive's handling of back-references over 9. If
> you want to access back-ref \12, you'll need 13 captures in your
> expression. Darn. It might be too late to fix for 1.34, but I'll patch
> the archive in the Vault. It's already fixed in HEAD.
>

by the way, I noticed that I don't have any debian boost package for
xpressive... it's been part of boost since when?

is it made only of headers, or also of a library?

thanks again
        Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net

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