Regex Test
regex_testTest a regular expression against sample strings. FREE.
Typical input {"pattern": "v(\d+)", "samples": ["v12", "beta"]} returns {"pattern": ..., "results": [{"sample": "v12", "match": true, "matched_text": "v12", "groups": ["12"]}, {"sample": "beta", "match": false, ...}], "match_count": 1}.
Use to confirm a pattern matches what you expect before shipping it. Not for validating JSON (json_validate). Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "invalid regex: "}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | A Python-flavor regular expression as a string, e.g. "v(\\d+)". | |
| samples | Yes | Strings to test the pattern against; only the first 50 are evaluated. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||