Dean Landolt (2013-08-29T14:11:03.000Z)
domenic at domenicdenicola.com (2013-09-08T00:21:14.908Z)
On Thu, Aug 29, 2013 at 4:13 AM, Brendan Eich <brendan at mozilla.com> wrote: > The design decision to face is what to do when a global regexp is used. > Throw, or ignore its lastIndex? I'd hate to see it throw. Ignoring lastIndex seems friendlier, especially if it were called `execAll`. It probably shouldn't be called `execIter` considering `exec` is already an iterator (even if a bit crazy). I'd love to be able to `send` a specific index to the generator, which would be completely equivalent to `RegExp.prototype.exec` without the lastIndex smell.