A global or sticky expression can match an empty string without moving lastIndex. A collector must advance before calling exec again.

Advance one logical input position

RegexLab advances one UTF-16 unit normally and one Unicode code point when u or v semantics are active.

A match cap is still required

Even a correct finite pattern can create a result at every position. RegexLab returns at most 1,000 matches and marks truncation.