Regex Verifier tests, generates, explains, and translates regular expressions in one tool. Generator mode produces patterns from positive and negative examples. Explain mode renders any pattern in plain English. Translation converts between JavaScript, Python, Go, Rust, and PCRE flavors. Anti-pattern detection flags ReDoS vulnerabilities with one-line fixes.
Regex Verifier
Verify, generate, explain, and translate regular expressions
How to use
- Select mode — verify (test pattern), generate (produce from examples), or translate (between dialects).
- Enter pattern — Drop in the regex pattern with optional flags (i, g, m, s, u, y).
- Add test cases — For verify mode: list inputs and whether each should match. For generate mode: provide positive and negative examples.
- Enable options — Turn on Explain Mode for plain-English description. Turn on Detect Anti-Pattern for ReDoS warnings.
- Run and review — Click Run or press Ctrl+Enter. Pass/fail per test case, explanation, and anti-pattern findings appear.
MCP / API
Call regex_verifier directly from any MCP-compatible agent:
// MCP TypeScript SDK
const result = await client.callTool({
name: "regex_verifier",
arguments: {
"mode": "verify"
}
});
// curl
curl -X POST https://obfus.link/mcp \
-H "Authorization: Bearer <SPT>" \
-H "Content-Type: application/json" \
-d '{"method":"tools/call","params":{"name":"regex_verifier","arguments":{"mode":"verify"}}}'Related tools
FAQ
What is Generate mode?
Inverts the verification workflow: you provide strings that should match and strings that should not, and the tool produces a regex that satisfies both sets. Three strategies (precise, balanced, permissive) control how strictly the pattern matches the positive examples.
Which dialects does Translate mode support?
JavaScript, Python, Go, Rust, and PCRE. Features that do not translate cleanly (variable-length lookbehind, backreferences in Go, atomic groups) are flagged in the warnings array with per-feature explanations and suggested workarounds.
What does the anti-pattern detector catch?
Catastrophic backtracking patterns (ReDoS), missing anchors, over-broad wildcards (.*), redundant character class escapes, and unnecessary capture groups. Each finding has severity (critical, warn, info) and a one-line fix.
Can I use this tool via the MCP API?
Yes. The tool is registered on the obfus.link MCP server at https://obfus.link/mcp. Call it from any MCP-compatible agent with a Shared Payment Token. The MCP tool name matches the snake_case slug shown in the integration snippet.