Global enumeration has explicit progress and result limits
Extraction follows the flags you provide. Without g, JavaScript returns one match; with g, the worker advances through repeated matches and includes explicit handling for zero-length results.
The engine stops at 10,000 returned matches and marks the report truncated if another match exists. It advances an empty global match by one Unicode code point in u mode or one UTF-16 code unit otherwise, preventing a non-progress loop.