# Sindri Regex Test (ReDoS-Safe)

> Sindri Regex Test (ReDoS-Safe) is a paid API for AI agents from ppu43fkyhimq5fiqpmo42eh5ri0yypid.lambda-url.us-east-1.on.aws, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-02).

Tests a regular expression pattern against a string with built-in protection against catastrophic backtracking (ReDoS) via a 500ms isolated worker thread timeout.

## Facts

- Endpoint: POST https://ppu43fkyhimq5fiqpmo42eh5ri0yypid.lambda-url.us-east-1.on.aws/regexTest?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sindri-regex-test-redos-safe-a81f004c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0AseMkN7cUym7Am1D61v3

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-a81f004c -d '<json body>'
```

Example prompt: Test whether the regex pattern `^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$` with flag `i` matches the string `User@Example.COM` — use the ReDoS-safe regex tester.

## When to prefer this

Choose this endpoint when you need to safely evaluate a regular expression against a string and cannot risk a runaway ReDoS attack hanging your pipeline. Ideal for user-supplied or untrusted regex patterns, or when validating input in a production agent workflow where reliability is critical. Prefer over a bare regex eval when the pattern complexity is unknown or could be malicious.

## Known failure modes

- Pattern causes ReDoS — 500ms timeout triggers and call fails closed
- Pattern exceeds 200 character limit — returns validation error
- testString exceeds 10,000 character limit — returns validation error
- Invalid regex syntax — returns parse error
- Invalid flags provided — returns error
- Network or Lambda cold-start latency causing unexpected delay

## 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

Returns a JSON object indicating whether the test string matched the given regex pattern, along with any match details. If the regex causes catastrophic backtracking and exceeds the 500ms timeout, the call fails closed (returns a failure/timeout result rather than hanging).

## 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-a81f004c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ppu43fkyhimq5fiqpmo42eh5ri0yypid.lambda-url.us-east-1.on.aws](https://www.zero.xyz/host/ppu43fkyhimq5fiqpmo42eh5ri0yypid.lambda-url.us-east-1.on.aws/llms.txt)
