# MoneyTools Regex Tester

> MoneyTools Regex Tester is a paid API for AI agents from tools.moneytools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-05).

Run a JavaScript regex against text and return all matches with indices and capture groups, with optional replace and ReDoS detection

## Facts

- Endpoint: GET https://tools.moneytools.dev/v1/regex?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-05
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/moneytools-regex-tester-1b3e39bd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qCMi3c1SRKFDpWVjLteKP

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 moneytools-regex-tester-1b3e39bd
```

Example prompt: Run the regex (\d{4})-(\d{2})-(\d{2}) with the global flag on this text: 'due 2026-11-04 and 2026-12-01' — give me all matches with their indices and capture groups.

## When to prefer this

Choose this endpoint when you need programmatic JavaScript-compatible regex matching with structured output (match indices, capture groups) rather than a simple pass/fail. It is especially useful when you also want ReDoS safety analysis on the pattern, or when you need a regex replace operation with full match details returned. It is priced at $0.001 per call via x402 on Base after a free tier, making it suitable for automated agent pipelines that need occasional regex processing without hosting their own compute.

## Known failure modes

- Missing required 'pattern' or 'text' query parameter returns an error without charge
- Invalid regex syntax causes a parse error response without charge
- Free tier of 10 calls/day exhausted triggers HTTP 402 requiring x402 micropayment or API key
- Ambiguous or empty pattern may return zero matches without error
- Very long input text combined with complex patterns may time out

## How this service works

Regex tester: Run a JavaScript regex on text: all matches with index and capture groups, optional replace, and a ReDoS warning for nested quantifiers. Free tier 10/day; then $0.001 via x402 (HTTP 402 + PAYMENT-REQUIRED) or X-API-Key credits. Not charged on failure. $0.001 USDC per call via x402 on Base. Run by MoneyTools.

## Output

A JSON object containing all regex matches (each with full match text, start index, and any capture groups), optionally the replaced string if a replacement was provided, a ReDoS warning if nested quantifiers are detected, and payment metadata including whether the call was charged, the network, and the transaction ID.

## 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": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pattern",
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "examples": [
        "due 2026-11-04 and 2026-12-01"
       ],
       "description": "input text"
      },
      "flags": {
       "type": "string",
       "examples": [
        "g"
       ],
       "description": "flags"
      },
      "pattern": {
       "type": "string",
       "examples": [
        "(\\d{4})-(\\d{2})-(\\d{2})"
       ],
       "description": "regex source"
      },
      "replace": {
       "type": "string",
       "description": "replacement string"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "properties": {
      "payment": {
       "type": "object",
       "properties": {
        "charged": {
         "type": "boolean"
        },
        "network": {
         "type": "string"
        },
        "amountUsd": {
         "type": "string"
        },
        "transaction": {
         "type": [
          "string",
          "null"
         ]
        }
       }
      },
      "freeTier": {
       "type": "object"
      },
      "_moneytools": {
       "type": "object",
       "description": "optional plan / partner hints"
      }
     },
     "description": "Tool-specific JSON result (see llms.txt / openapi.json). Always includes payment info.",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/moneytools-regex-tester-1b3e39bd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.moneytools.dev](https://www.zero.xyz/host/tools.moneytools.dev/llms.txt)
