Test a regex on real engines
test_regexRun a regex on JavaScript, Python, PCRE2, and RE2 engines to compare matches, groups, replacement results, compile errors, and disagreements, including ReDoS risk.
Instructions
Runs a regex on real engines: JavaScript (V8), Python (CPython re), PCRE2 (PHP, grep -P), RE2 (Go, BigQuery). Each gives its compile error with position, or every match with groups and named groups, and the replacement result in its own syntax. Positions are in characters. Lists where engines disagree.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | No | any of i m s x u | |
| inputs | Yes | ||
| flavors | No | default all four | |
| pattern | Yes | ||
| max_matches | No | ||
| replacement | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engines | Yes |