Validates regex patterns for syntax correctness before execution, preventing runtime errors in your code. Use via MCP in Cursor or Windsurf, or call GET /v1/regex/validate with your pattern. Returns boolean validity plus detailed error messages for malformed expressions. Essential for dynamic regex construction where pattern correctness can't be guaranteed at compile time.
curl "https://tinyfn.io/v1/regex/validate" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/regex/validate', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/regex/validate',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's regex tools:
{
"mcpServers": {
"tinyfn-regex": {
"url": "https://tinyfn.io/mcp/regex",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Send a GET request to /v1/regex/validate with your pattern as a parameter. The API returns true/false validity plus error details if the pattern is malformed.
The validator uses standard PCRE (Perl Compatible Regular Expressions) syntax, which is compatible with most programming languages including JavaScript, Python, and PHP.
Yes, use the validate pattern tool in Cursor, Claude Code, or other MCP clients to check regex syntax before implementing it in your code.
The tool returns false validity status along with a specific error message describing what's wrong with the pattern syntax, like unmatched brackets or invalid escape sequences.
Validation prevents runtime exceptions and helps catch syntax errors early, especially when building dynamic patterns from user input or configuration files.
Get your free API key and start using Validate Pattern in seconds.
Get Free API Key