# Saylor Innovations Regex Tester

> Saylor Innovations Regex Tester is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-17).

Tests a JavaScript regular expression against text and returns all matches, capture groups, and named groups

## Facts

- Endpoint: GET https://saylorinnovations.com/api/regex/test?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saylor-innovations-regex-tester-813cb0df
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_alI9DFWyJjYUKGK0hxpOa

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 saylor-innovations-regex-tester-813cb0df
```

Example prompt: Test the JavaScript regex pattern (\d{4})-(\d{2})-(\d{2}) with the global flag against this text: 'Invoice date: 2024-03-15, due by 2024-04-01. Paid on 2023-12-31.' and show me all the matches and their capture groups.

## When to prefer this

Choose this endpoint when you need JavaScript-flavored regex semantics (including named capture groups, Unicode mode, sticky flag) and want structured per-match results with character offsets and capture group arrays, rather than a simple boolean match check or a server-side language-specific regex engine.

## Known failure modes

- Invalid regex pattern causes a parse error response
- Flags string contains invalid or repeated characters
- Text exceeds 5,000 character limit returns a validation error
- Pattern exceeds 500 character limit returns a validation error
- Missing required query parameters (pattern or text) returns an error
- Pattern matches more than 100 times — result is truncated and truncated flag is set to true

## How this service works

Regex tester - matches, capture groups and named groups for a JavaScript pattern against text

## Output

A JSON object containing the original pattern, the flags applied, a boolean indicating whether any match was found, the total match count, a truncated flag if more than 100 matches exist, and an array of up to 100 match objects each with the matched text, start/end character offsets, numbered capture groups (null for unmatched groups), and named capture groups (null if none defined).

## 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": 5000,
       "description": "Text to search, max 5,000 characters"
      },
      "flags": {
       "type": "string",
       "default": "g",
       "pattern": "^[gimsuyd]{0,7}$",
       "description": "Regex flags from g i m s u y d, each at most once (default g)"
      },
      "pattern": {
       "type": "string",
       "examples": [
        "(\\d{4})-(\\d{2})-(\\d{2})",
        "\\b[A-Z][a-z]+\\b"
       ],
       "maxLength": 500,
       "description": "JavaScript regular expression source without slashes, max 500 characters"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "pattern",
      "matched",
      "match_count",
      "matches"
     ],
     "properties": {
      "flags": {
       "type": "string",
       "description": "Flags that were applied"
      },
      "engine": {
       "type": [
        "string",
        "null"
       ],
       "description": "Engine or model that produced the result"
      },
      "matched": {
       "type": "boolean",
       "description": "True when at least one match was found"
      },
      "matches": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "end": {
          "type": "number",
          "description": "End offset (exclusive)"
         },
         "index": {
          "type": "number",
          "description": "Start offset in the input"
         },
         "match": {
          "type": "string",
          "description": "The matched text"
         },
         "named": {
          "type": [
           "object",
           "null"
          ],
          "description": "Named capture groups, or null"
         },
         "captures": {
          "type": "array",
          "item
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saylor-innovations-regex-tester-813cb0df/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
