Re: Re: Capturing groups with a quantifier in look-behind assertions should capture the leftmost substring matched by that group or the rightmost one?

2016-01-15 Thread Yang Guo
Please note that RegExp.$1 is not part of the spec. The implementation in V8 is done in a way to mirror .Net as much as possible. Ignoring .Captures property that has no equivalent in Javascript, capturing the left-most sub-match inside a lookbehind is what .Net does. Yang

RE: Specifying the Existential Operator using Abrupt Completion

2016-01-15 Thread Gary Guo
Note that this can possibly complicate the parser as additional effort is required to distinguish it from conditional expression. From: zenpars...@gmail.com Date: Thu, 14 Jan 2016 15:08:21 + Subject: Re: Specifying the Existential Operator using Abrupt Completion To: claude.pa...@gmail.com;

Re: Re: Capturing groups with a quantifier in look-behind assertions should capture the leftmost substring matched by that group or the rightmost one?

2016-01-15 Thread Yang Guo
I'm not even sure why RegExp.$1 is mentioned here. The submatches can be observed just fine as part of the match result. And I don't think it's a "gotcha" if it's reflected in the spec. And it is in the current draft afaict. Yang ___ es-discuss mailing

Re: Re: Capturing groups with a quantifier in look-behind assertions should capture the leftmost substring matched by that group or the rightmost one?

2016-01-15 Thread Andrea Giammarchi
FWIF `RegExp.$1` and others are de-facto standard and removing them would break the Web and much more. I'm not sure how these would affect a lookbehind proposal but I these cannot be exclude from the list of possible gotchas. Best Regards On Fri, Jan 15, 2016 at 3:28 PM, Yang Guo

Re: Re: Capturing groups with a quantifier in look-behind assertions should capture the leftmost substring matched by that group or the rightmost one?

2016-01-15 Thread Andrea Giammarchi
Yeah, sorry for the noise but this part confused me too > Please note that RegExp.$1 is not part of the spec All good then, Regards. On Fri, Jan 15, 2016 at 3:53 PM, Yang Guo wrote: > I'm not even sure why RegExp.$1 is mentioned here. The submatches can be > observed just