Letting RegExp method return something iterable?

Axel Rauschmayer axel at rauschma.de
Thu Aug 29 00:07:03 PDT 2013


> The fact that s.match(/re/g) returns the array of all matches (with captures) sucks some of the oxygen away from any /re/g.execAll(s) proposal.
> 
> But String.prototype.match has perlish hair (e.g., those capture groups showing up in the result array).

Really? AFAICT, only the complete matches (group 0) are returned.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130829/b8266966/attachment.html>


More information about the es-discuss mailing list