Compile once and reuse across pages. Invalid options, unsupported RE2 syntax, missing
matches/groups and exceeded limits return empty text. Regex inputs are limited to
4,096 pattern code units and 1,000,000 text code units. The compiled program is limited
to 4,096 instructions; searches share a conservative 16,000,000-unit work budget
based on program size, capture count and remaining input length. No native RegExp fallback.
Compile once and reuse across pages. Invalid options, unsupported RE2 syntax, missing matches/groups and exceeded limits return empty text. Regex inputs are limited to 4,096 pattern code units and 1,000,000 text code units. The compiled program is limited to 4,096 instructions; searches share a conservative 16,000,000-unit work budget based on program size, capture count and remaining input length. No native RegExp fallback.