-
peterwmwong authored
Enable --harmony-string-matchall by default. String.prototype.matchAll behaves similarly to String.prototype.match, but returns a full regexp result object for each match in a global or sticky regexp. This offers a simple way to iterate over matches when access to e.g. capture groups is needed. const string = 'a b c'; const regex = /[ac]/g; for (const match of string.matchAll(regex)) { console.log(`${match[0]} at ${match.index}`); } // a at 0 // c at 4 More information can be found here: https://github.com/tc39/proposal-string-matchall Drive-by: Update debug evaluate side effect expectations to handle String.p.matchAll and RegExp.p[@@matchAll] Bug: v8:6890 Change-Id: Ie3e712af66689936b7d2a15df705b792ccf06bd3 Reviewed-on: https://chromium-review.googlesource.com/c/1377774Reviewed-by: Mathias Bynens <mathias@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com> Cr-Commit-Position: refs/heads/master@{#58250}
76cb4fe6
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
bugs/harmony | ||
debug | ||
protocol | ||
regress | ||
wrapper | ||
BUILD.gn | ||
debugger.status | ||
test-api.js | ||
testcfg.py |