matchAll
For ES level < 2020:
- maps
str.matchAll(pattern).forEach {}towhile (match = pattern.exec(str)) {}
Note pattern must be a simple variable with a value of a regular
expression with the g flag set at runtime.
For ES level < 2020:
str.matchAll(pattern).forEach {} to
while (match = pattern.exec(str)) {}Note pattern must be a simple variable with a value of a regular
expression with the g flag set at runtime.