zig-js issue zig-utils/zig-js#213 needs JavaScriptCore-compatible empty regular expressions.
ECMAScript treats an empty pattern as a valid zero-width regex, but Regex.compileWithFlags currently returns RegexError.EmptyPattern before the parser can build its existing empty AST node.
Acceptance criteria:
- Empty patterns compile successfully.
findandfindFromreturn a zero-width match at the requested valid position.- Iteration/search callers can advance after zero-width matches without an engine loop.
- Existing non-empty behavior remains covered.
- README/API documentation no longer claims empty patterns are rejected.