well, lastMatch is 9 chars against ['$&'] 6 but actually didn't know about lastMatch, it looks like to have more info about those properties, included lastParen, I had to check msdn rather than MDN since latter does not mention it while mans shows an example: http://msdn.microsoft.com/en-us/library/ie/3k9c4a32(v=vs.94).aspx
So, good to know ... in any case, I wrote that was hacky and usually hacky and looking good do not cope with each other ;-) Also nobody mentioned here, neither I did in my post, about performance ... a for loop is at least twice as fast as any of these methods :-/ br On Sun, Mar 3, 2013 at 4:26 PM, Brendan Eich <[email protected]> wrote: > Brendan Eich wrote: > > Andrea Giammarchi wrote: >> >>> RegExp['$&']; >>> >> >> My Perl 4 _homage_, blechh. >> > > (You could at least have had the decency to use RegExp.lastMatch... ;-) > > /be >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

