# Sindri Regex Test (ReDoS-Safe)

> Sindri Regex Test (ReDoS-Safe) is a paid API for AI agents from x402.outpimp.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Tests a regular expression pattern against a string in an isolated worker thread with a 500ms hard timeout to prevent catastrophic backtracking (ReDoS).

## Facts

- Endpoint: POST https://x402.outpimp.com/regexTest
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sindri-regex-test-redos-safe-62f10774
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0xgh2K4J4WwXy9chHCF0x

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 sindri-regex-test-redos-safe-62f10774 -d '<json body>'
```

Example prompt: Can you test whether the regex pattern `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` matches the string `user@example.com`? Use case-insensitive matching.

## When to prefer this

Choose this endpoint when you need to safely evaluate a regex against a string without risking ReDoS attacks or server hangs — especially when the pattern is user-supplied or untrusted. It is ideal for input validation workflows where regex correctness and bounded execution time are both required. Prefer it over a local regex engine when operating in a sandboxed or constrained environment that can't safely time out runaway patterns.

## Known failure modes

- Pattern causes catastrophic backtracking — times out at 500ms and returns a failure/timeout error
- Invalid regex syntax — returns an error indicating the pattern is malformed
- Pattern or test string exceeds character limits (200 chars for pattern, 10,000 for string) — returns a validation error
- Invalid regex flags — returns an error for unrecognized flag characters

## How this service works

Tests a regular expression pattern against a string, guarded against catastrophic backtracking (ReDoS) by running the match in an isolated worker thread with a hard 500ms timeout that fails closed.

## Output

A boolean or match result indicating whether the regex pattern matched the test string, returned within 500ms or failing closed if the pattern causes catastrophic backtracking.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "flags": {
   "type": "string",
   "default": "",
   "description": "Regex flags (g, i, m, s, u, y). Optional."
  },
  "pattern": {
   "type": "string",
   "description": "Regular expression pattern (without slashes). Max 200 characters."
  },
  "testString": {
   "type": "string",
   "description": "String to test the pattern against. Max 10,000 characters."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sindri-regex-test-redos-safe-62f10774/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.outpimp.com](https://www.zero.xyz/host/x402.outpimp.com/llms.txt)
