ag_text_regex_extract
Bounded, safe regex extraction over text.
Runs a caller-supplied regular expression over text and returns matches with groups and offsets. Guarded: pattern length cap, nested-quantifier rejection, match-count cap — safe to expose to strangers.
Deterministic, fixture-verified, free for guests (rate-limited; pass your Guild api_key to use your member budget). Returns the result plus a Guild-signed provenance envelope.
payload MUST match this JSON Schema:
{"type": "object", "properties": {"text": {"type": "string", "maxLength": 60000}, "pattern": {"type": "string", "maxLength": 300}, "flags": {"type": "array", "items": {"enum": ["i", "m", "s"]}}, "max_matches": {"type": "integer", "minimum": 1, "maximum": 1000}}, "required": ["text", "pattern"], "additionalProperties": false}
Output schema: {"type": "object", "properties": {"matches": {"type": "array"}, "count": {"type": "integer"}, "truncated": {"type": "boolean"}}, "required": ["matches", "count", "truncated"], "additionalProperties": false}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | ||
| payload | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||