test_regex
Run a regex against text in real Python, JavaScript, and regex engines to report every match, capture groups, and engine disagreements before you claim the pattern works.
Instructions
Run a regex against text in REAL engines and report every match.
Use this to check any regex before telling the user it works. For each engine you get all matches (global search) with [start:end) spans in Unicode code points, the numbered and named capture groups, and a flag when engines disagree.
pattern: the regex source, exactly as it would appear in code (no delimiters, no extra string escaping). subject: one text, or a list of texts; each list item is a separate case. flags: letters: i ignore case, m multiline, s dot matches newline, x verbose and a ASCII classes (Python only), u unicode, v unicodeSets and y sticky (JavaScript only). g is implied. engines: any of "python", "javascript" (or "js"), "regex". Default: every engine available on this machine; unavailable ones are reported, not silently skipped. timeout_s: hard limit (0.2-30). A run that exceeds it is killed and reported as a catastrophic-backtracking case. max_matches: cap per case (max 500). Limits: pattern 5000 chars, 100 cases, 200k characters of subject in total.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | No | ||
| engines | No | ||
| pattern | Yes | ||
| subject | Yes | ||
| timeout_s | No | ||
| max_matches | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |