Reads the pattern with `exec`, as `matchAll` copies the pattern on each
call: the masker runs on every log line, and its patterns are large. The
search starts at the beginning, and `exec` leaves `lastIndex` at 0 once it
finds no more. An empty match is stepped past, so it cannot repeat forever.
Lists every match of a global pattern in a text.
Reads the pattern with `exec`, as `matchAll` copies the pattern on each call: the masker runs on every log line, and its patterns are large. The search starts at the beginning, and `exec` leaves `lastIndex` at 0 once it finds no more. An empty match is stepped past, so it cannot repeat forever.