RegExp.$1 spec

Erik Arvidsson erik.arvidsson at gmail.com
Fri Apr 6 10:06:51 PDT 2007


On 4/6/07, Lars T Hansen <lth at acm.org> wrote:
> Does anyone know how widespread the use of this mechanism is?

It is used quite a lot...

700 hits for RegExp\.\$\d
http://www.google.com/codesearch?hl=en&lr=&q=RegExp\.\%24\d+lang%3Ajavascript&btnG=Search

6000 hits for RegExp
http://www.google.com/codesearch?as_q=RegExp&btnG=Search+Code&hl=en&as_lang=javascript&as_license_restrict=i&as_license=&as_package=&as_filename=&as_case=y

So about 10% of the JavaScript code that uses RegExp also uses the
RegExp.$n notation.

-- 
erik



More information about the Es4-discuss mailing list