Regex tester
regex_testTest JavaScript regular expressions against a subject string and retrieve detailed match information including indices, capture groups, and named groups. Supports all standard regex flags.
Instructions
Run a JavaScript regular expression against a subject string and return each match with its index, positional capture groups, and any named groups. Flags are honored exactly: without the g flag only the first match is returned; with g, all matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | No | Regex flags, e.g. "g", "i", "m", "s" | |
| pattern | Yes | The regular-expression source (no slashes) | |
| subject | Yes | The text to search |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| valid | Yes | ||
| matches | No | ||
| matchCount | No |