Test a regular expression
regex_testRead-onlyIdempotent
Runs a JavaScript regular expression against text and returns every match with its position and capture groups, or the text after replacement. Use it to verify a regex actually works before relying on it.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| flags | No | Optional flags: i (ignore case), m (multiline), s (dotall), u (unicode), y (sticky). Global matching is always on. | |
| pattern | Yes | Regex pattern without slashes, e.g. "(\\d{3})-(\\d{4})" | |
| max_matches | No | Default 100 | |
| replace_with | No | Optional replacement string ($1, $<name> supported). If set, returns the replaced text too. |