
John Maddock
The new stuff in Perl-5.10 and supported in Boost.Regex are:
Named sub-expressions:
http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/syntax/... _syntax.html#boost_regex.syntax.perl_syntax.named_subexpressions
Branch resets:
http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/syntax/... _syntax.html#boost_regex.syntax.perl_syntax.branch_reset
Recursion:
http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/syntax/... _syntax.html#boost_regex.syntax.perl_syntax.recursive_expressions
Conditional on recursion or subexpression match:
http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/syntax/... _syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions
The (*OPERATOR) syntax introduced in Perl-5.10 is not currently supported.
HTH, John.
That's fantastic, thank you. I have an unrelated Boost.Regex question: how expensive are basic_regex objects to copy? Say, relative to constructing (and thus reparsing) from a string pattern, anew? The reason I ask is because I have a variant type with several value types, including a regex type. I was wondering whether it makes more sense to store the regex pattern in that variant as a string, and to construct the actual basic_regex from that string every time I need to operate on it, or to store it as a basic_regex and hope that copies are not too expensive. One other alternative is to store the regex on the heap using a smart pointer, but I'd rather keep value semantics so long as performance isn't an issue. (Oh, incidentally, does Boost.Regex have support for Boost.Serialization? Right now what I do is serialize it [the pattern] as an std::string -- is that the recommended approach?) Thanks!