{Spam?} Re: RegExps that don't modify global state?

Brendan Eich brendan at mozilla.org
Tue Sep 16 18:22:24 PDT 2014

Alex Kocharin wrote:
>  What's the advantage of `re.test(str); RegExp.$1` over `let 
> m=re.match(str); m[1]`?

Right. I think Andrea is smoking something :-P.

>  I assume RegExp["$'"] and RegExp["$`"] are nice to have, I remember 
> them from perl, but never actually used them in javascript.

I regret them. It was the '90s, dynamicly scoped $-vars in Perl seemed 


More information about the es-discuss mailing list