# GeekVault Regex Test

> GeekVault Regex Test is a paid API for AI agents from api.geekvault.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Tests a regex pattern against a text string and returns whether it matches plus all captured match strings

## Facts

- Endpoint: POST https://api.geekvault.dev/dev-tools/v1/regex-test?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/geekvault-regex-test-ea92fe75
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SPbp9oEPpujILoqkQsw-I

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 geekvault-regex-test-ea92fe75 -d '<json body>'
```

Example prompt: Test whether the string 'user@example.com' matches the regex pattern '^[\w.+-]+@[\w-]+\.[\w.]+$' and tell me if it's a valid email format.

## When to prefer this

Choose this endpoint when you need a quick, stateless regex match/extraction without spinning up a local runtime — especially useful in agent pipelines that lack a code-execution sandbox. Ideal for validating or extracting patterns from user input, log lines, or scraped text on the fly. Note the Rust regex crate syntax limitation: patterns requiring lookahead, lookbehind, or backreferences will not work here.

## Known failure modes

- Invalid regex pattern syntax returns an error (pattern uses unsupported features like backreferences or lookaround not supported by Rust regex crate)
- Empty text or pattern may return is_match: false with empty matches array
- Pattern compiles but matches nothing: is_match is false and matches is empty array
- Payment failure via x402 if USDC balance is insufficient or Base network is congested

## How this service works

Network, docs, image, web, and dev utility tools paid per call via x402. No signup, no API keys, no subscriptions — just USDC on Base.

## Output

Returns a JSON object with 'is_match' (boolean indicating whether the pattern matched the text at all) and 'matches' (an array of strings containing all matched substrings). Uses Rust's `regex` crate syntax, which is similar to RE2/PCRE but without backreferences or lookahead/lookbehind.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "text",
  "pattern"
 ],
 "properties": {
  "text": {
   "type": "string"
  },
  "pattern": {
   "type": "string",
   "description": "Sintaxis regex del crate Rust `regex` (similar a RE2/PCRE, sin backreferences ni lookaround)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "is_match",
  "matches",
  "truncated"
 ],
 "properties": {
  "matches": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "is_match": {
   "type": "boolean"
  },
  "truncated": {
   "type": "boolean",
   "description": "true si habia mas de MAX_MATCHES coincidencias y se cortaron."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/geekvault-regex-test-ea92fe75/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.geekvault.dev](https://www.zero.xyz/host/api.geekvault.dev/llms.txt)
