Suggested RegExp Improvements

Waldemar Horwat waldemar at google.com
Fri Nov 12 17:56:08 PST 2010


On 11/12/10 15:04, Brendan Eich wrote:
> On Nov 12, 2010, at 2:52 PM, Marc Harter wrote:
>
>> After considering all the breadth this discussion could take maybe it
>> would be wise to just focus on one issue at a time.  For me, the biggest
>> missing feature is lookbehind.  Its common to most languages
>> implementing the Perl-RegExp-syntax, it is very useful when looking for
>> patterns that follow or don't follow a particular pattern.  I guess I'm
>> confused why lookahead made it in but not lookbehind.
>
> This was 1998, Netscape 4 work I did in '97 was based on Perl 4(!), but we proposed to ECMA TC39 TG1 (the JS group -- things were different then, including capitalization) something based on Perl 5. We didn't get everything, and we had to rationalize some obvious quirks.
>
> I don't remember lookbehind (which emerged in Perl 5.005 in July '98) being left out on purpose. Waldemar may recall more, I'd handed him the JS keys inside netscape.com to go do mozilla.org.
>
> If you are game to write a proposal or mini-spec (in the style of ES5 even), let me know. I'll chat with other TC39'ers next week about this.

The ES3 spec was based on what was stable at the time.  Perl had been experimenting with other constructs in regexp's, but there was some churn there, and I didn't want to go for features that were still in flux.

     Waldemar


More information about the es-discuss mailing list