Andrea Giammarchi wrote: > I would simply apply same logic we have already for the > look ahead ... or you think that would cause problems? As has been discussed previously, it is nontrivial to implement infinite-length lookbehind efficiently (where you’re not just testing /(?:lookbehind)$/ against the lookbehind start position). For this reason, .NET is the only major regex flavor that supports it. It’s able to do so by taking advantage of its Right-to-Left Mode [1], the actual semantics of which are a big question mark. Sometimes it matches intuitive developer expectations (e.g., \d+ matches all of “123” rather than just the trailing “3”), and sometimes it doesn’t. Infinite-length lookbehind would of course be ideal and doesn’t *have* to cause problems. However, it certainly could cause problems if it is poorly spec-ed and/or poorly implemented. --Steven Levithan [1]: http://msdn.microsoft.com/en-us/library/yd1hzczs.aspx#RightToLeft
On Sat, Mar 17, 2012 at 1:07 PM, Lasse Reichstein <[email protected]> wrote: On Sat, Mar 17, 2012 at 9:00 AM, Steven L. <[email protected]> wrote: > I thought so, too. See [2] from Waldemar ("May 24-26 rough meeting notes"). > Specifically, he stated "Lookbehind support is promoted to required > normative." Are there any plans for which kind of look-behind to allow? Literal only, fixed-length, repetitions of fixed-length, unrestricted or something else? The fallback based RegExp specification doesn't lend itself easily to unrestricted regexps (unless they are matched backwards instead of forwards, but I think that's going to be confusing). /L _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

