Re: Review request for 6878475: Better regex named-group and backreference syntax

2009-10-21 Thread Alan Bateman
Xueming Shen wrote: Alan, Martin The CCC also approved this change. Would you please help review? There is no doc/impl change in the webrev since you guys reviewed (for CCC) last time. http://cr.openjdk.java.net/~sherman/6878475/webrev Thanks, Sherman This looks good to me. -Alan

Review request for 6878475: Better regex named-group and backreference syntax

2009-10-20 Thread Xueming Shen
Alan, Martin The CCC also approved this change. Would you please help review? There is no doc/impl change in the webrev since you guys reviewed (for CCC) last time. http://cr.openjdk.java.net/~sherman/6878475/webrev Thanks, Sherman Xueming Shen wrote: Hi Guess you might be interested to he

Re: Regex named-group and backreference syntax

2009-09-03 Thread Xueming Shen
Hi Guess you might be interested to help review the change for this RFE, here is the webrev. http://cr.openjdk.java.net/~sherman/6878475/webrev Since this is an API update, the change will need to go through a review process before it can be integrated into the workspace, so it might take a

Re: Regex named-group and backreference syntax

2009-09-02 Thread Alan Moore
On Wed, Sep 2, 2009 at 3:21 PM, Xueming Shen wrote: > > RFE#6878475 has been filed to trace this issue. > > At this point we are going to update the doc and implementation to > (1)disallow the group name started with digit character > (2)use ${name} for the group reference in replacement string. G

Re: Regex named-group and backreference syntax

2009-09-02 Thread Xueming Shen
RFE#6878475 has been filed to trace this issue. At this point we are going to update the doc and implementation to (1)disallow the group name started with digit character (2)use ${name} for the group reference in replacement string. The \k and ${n} can leave for further discussion (whether or n

Re: Regex named-group and backreference syntax

2009-09-02 Thread Mark Reinhold
> Date: Wed, 02 Sep 2009 18:55:49 +0100 > From: Andrew John Hughes > 2009/9/2 Mark Reinhold : >> I'd say ${name} is the best option here given that it will be familiar, >> at least, to Perl and .NET developers. > > It's also used for substitution in shell and Makefiles :) That too! - Mark

Re: Regex named-group and backreference syntax

2009-09-02 Thread Andrew John Hughes
2009/9/2 Mark Reinhold : >> Date: Wed, 02 Sep 2009 01:58:46 -0700 >> From: [email protected] > >... > I'd say ${name} is the best option here given that it will be familiar, > at least, to Perl and .NET developers. > It's also used for substitution in shell and Makefiles :) > - Mark > --

Re: Regex named-group and backreference syntax

2009-09-02 Thread Mark Reinhold
> Date: Wed, 02 Sep 2009 01:58:46 -0700 > From: [email protected] > On Wed, Sep 2, 2009 at 12:15 AM, Xueming Shen wrote: >> It would be an "ambiguity" (and then confused) only if we >> had the \k and $ as the legally supported group >> reference syntax:-) That said I have to admit that it does

Re: Regex named-group and backreference syntax

2009-09-02 Thread Alan Moore
Hi Sherman, On Wed, Sep 2, 2009 at 12:15 AM, Xueming Shen wrote: > It would be an "ambiguity" (and then confused) only if we > had the \k and $ as the legally supported group > reference syntax:-) That said I have to admit that it does > not have any value-add to allow the a group name begins > wi

Re: Regex named-group and backreference syntax

2009-09-02 Thread Xueming Shen
Hi Alan, It would be an "ambiguity" (and then confused) only if we had the \k and $ as the legally supported group reference syntax:-) That said I have to admit that it does not have any value-add to allow the a group name begins with a digit character. So if we have a consensus I would be hap

Regex named-group and backreference syntax

2009-09-01 Thread Alan Moore
Looking at the new named-capture feature, two things jump out at me. The first is that the rules governing group names make "0", "1", "2", etc. valid names. That's bound to cause confusion, as programmers use \k<1> in the regex, or $<1> in the replacement string, meaning them as ordinal backrefere