# AISkills402 — Regex From Examples Skill File

> AISkills402 — Regex From Examples Skill File is a paid API for AI agents from api.aiskills402.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-22).

Purchases and downloads the 'Regex From Examples' SKILL.md file for AI agents, enabling the agent to generate regular expressions from input/output examples for any script type.

## Facts

- Endpoint: GET https://api.aiskills402.com/v1/skills/regex-from-examples/file?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aiskills402-regex-from-examples-skill-file-b9eefeb7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wiMwuuhhdtSiwnvpVBkZl

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 aiskills402-regex-from-examples-skill-file-b9eefeb7
```

Example prompt: Buy me the regex-from-examples skill from AISkills402 — pay the one-time $0.01 USDC fee on Base and give me the SKILL.md file so I can use it going forward.

## When to prefer this

Choose this endpoint when your AI agent needs to acquire the capability to generate regular expressions from examples and you want a tested, versioned SKILL.md file delivered via a one-time $0.01 USDC micropayment on Base using x402. Prefer this over manually writing regex logic or using a generic code-generation API when you want a reusable, structured skill file your agent can reference repeatedly without recurring costs.

## Known failure modes

- Payment not completed or rejected — returns 402 Payment Required if x402 USDC payment on Base has not been settled
- Invalid or missing payment header — agent fails to attach correct x402 payment proof
- Network error contacting Base blockchain for settlement verification
- Skill file temporarily unavailable — server-side error (500)
- Redownload token not saved — agent loses ability to re-fetch without paying again

## How this service works

Regex From Examples for Any Script — Writes a JavaScript regular expression from a description plus lists of strings that must match and must not match, answered as JSON with the pattern and flags. Knows the traps measured in Node 24 - \b and \w are ASCII-only even with the u flag, so \bдума\b never matches Cyrillic text and \w+ cuts "café" to "caf"; a word boundary for any script is a pair of lookarounds with \p{L} and the u flag. Anchors a validator so extra text around the value is rejected,…

## Output

Returns a JSON object containing: the full text content of the SKILL.md file (encoded as UTF-8), the skill name ('Regex From Examples for Any Script'), the skill identifier, a SHA256 hash of the file for integrity verification, a payment receipt with the on-chain settlement transaction hash, the version number (e.g. 1.0.0), and a redownload URL and token for future free re-downloads or version updates.

## 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",
      "HEAD"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "file": {
   "name": "SKILL.md",
   "content": "<the SKILL.md file>",
   "encoding": "utf-8"
  },
  "name": "Regex From Examples for Any Script",
  "skill": "regex-from-examples",
  "sha256": "<sha256 of SKILL.md>",
  "receipt": {
   "tx": "0x<settlement transaction>",
   "settled": true
  },
  "version": "1.0.0",
  "redownload": {
   "url": "<api>/v1/purchases/<token>",
   "token": "<64 hex chars>"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aiskills402-regex-from-examples-skill-file-b9eefeb7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aiskills402.com](https://www.zero.xyz/host/api.aiskills402.com/llms.txt)
