Better match results with String.prototype.matchAll()
Chrome 73 introduces the String.prototype.matchAll()
method. It behaves similarly to match()
, but offers a simple way to iterate over matches, especially when you need access to capture groups.
Upcoming regular expression features
An overview of the exciting new features coming to JavaScript regular expressions, including named captures, the dotAll flag, Unicode property escapes, and lookbehind assertions.