# Quartermaster Regex Matcher

> Quartermaster Regex Matcher is a paid API for AI agents from quartermaster.surewhynot.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Tests a regular expression against text and returns all matches with numbered and named capture groups

## Facts

- Endpoint: GET https://quartermaster.surewhynot.app/v1/regex
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/quartermaster-regex-matcher-a883b6ff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hCrX7Yb9IOZfLZZjZM89L

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability quartermaster-regex-matcher-a883b6ff
```

Example prompt: Run this regex pattern `(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})` against the text "Order placed on 2024-03-15 and shipped on 2024-03-18" using the i flag, and give me every match with its named capture groups.

## When to prefer this

Use this endpoint when you need deterministic, server-side regex matching with structured capture group output — particularly when you need both numbered and named groups returned in a machine-readable format. Prefer this over client-side regex when the agent cannot execute code locally, or when you need a reliable, reproducible extraction step in a workflow pipeline.

## Known failure modes

- Invalid regex pattern syntax — returns an error indicating the pattern could not be compiled
- Text exceeds 20,000 character limit — request rejected with validation error
- Pattern exceeds 1,000 character limit — request rejected
- Invalid flag characters supplied — only g i m s u y are accepted
- No matches found — returns an empty matches array rather than an error

## How this service works

Test a regular expression against text and return every match with numbered and named capture groups. Deterministic.

## Output

A list of all matches found in the text, each with its full match string, the positions of the match, numbered capture groups (by index), and named capture groups (by name) — deterministic and reproducible for the same inputs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pattern",
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "maxLength": 20000,
       "description": "Text to match against"
      },
      "flags": {
       "type": "string",
       "description": "Any of g i m s u y (g always applied)"
      },
      "pattern": {
       "type": "string",
       "maxLength": 1000,
       "description": "Regular expression source"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/quartermaster-regex-matcher-a883b6ff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from quartermaster.surewhynot.app](https://www.zero.xyz/host/quartermaster.surewhynot.app/llms.txt)
