[soc][regex] multiple existing practices for named sub-expressions

Part of my GSoC project (and probably the easiest part) is to implement named sub-expressions in Boost.Regex. Right now, most regex engines have this capability, but there are two camps for how the named sub-expressions match up with the numbers used for backreferences. A very useful overview of the two possibilities can be found at http://www.regular-expressions.info/named.html Essentially, .NET numbers all the named captures after all the unnamed captures, and everybody else simply numbers them all in order from left to right. My personal opinion is that the Boost.Regex implementation should follow Python's and PCRE's practice instead of the .NET syntax or an amalgam of the two, but this is a decision for the boost community, not for me. Thoughts? -Hugh

Hugh Wimberly wrote:
Essentially, .NET numbers all the named captures after all the unnamed captures, and everybody else simply numbers them all in order from left to right. My personal opinion is that the Boost.Regex implementation should follow Python's and PCRE's practice
Absolutely. That's what Xpressive does, also. -- Eric Niebler Boost Consulting www.boost-consulting.com

On 6/4/07, Eric Niebler <eric@boost-consulting.com> wrote:
Hugh Wimberly wrote:
Essentially, .NET numbers all the named captures after all the unnamed captures, and everybody else simply numbers them all in order from left to right. My personal opinion is that the Boost.Regex implementation should follow Python's and PCRE's practice
Absolutely. That's what Xpressive does, also.
I agree. Taking the Python and PCRE path seems more user-friendly, in terms of implementation as well as compatibility Jake
participants (3)
-
Eric Niebler
-
Hugh Wimberly
-
Jake Voytko