Test a regular expression
test_regexRun a JavaScript (ECMAScript) regular expression against text. Returns the match count and, for each match, the matched text, its 0-based index, numbered capture groups and named groups. Returns 'No matches.' when nothing matches. All matches are listed (the g flag is added automatically), up to 200. Invalid patterns or flags return an error explaining why; patterns that run longer than 0.5 seconds are stopped with an error. Text up to 100 KB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to search | |
| flags | No | Any of d, g, i, m, s, u, v, y; for example gi for case-insensitive | g |
| pattern | Yes | The pattern without surrounding slashes, for example (\d+)-(?<unit>[a-z]+) |