Validates regex patterns against text strings, returning true/false match results. Use via MCP in Cursor or Windsurf, or call GET /v1/regex/test with pattern and text parameters. Perfect for form validation, data cleaning, and pattern verification without regex engine inconsistencies across languages.
curl "https://tinyfn.io/v1/regex/test" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/regex/test', {
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/test',
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 GET request to /v1/regex/test with pattern='^[\w\.-]+@[\w\.-]+\.[a-zA-Z]{2,}$' and text='[email protected]'. Returns boolean match result.
Uses standard PCRE (Perl Compatible Regular Expressions) flavor, ensuring consistent behavior across different programming environments and AI agents.
Yes, available as MCP tool in Cursor, Claude Code, Windsurf, and other supported editors. AI agents can test patterns without hallucinating regex behavior.
Supports standard regex flags and multiline text input. Specify flags in your pattern or use the API's flag parameters for case-insensitive or multiline matching.
Provides deterministic, language-agnostic results. Eliminates regex engine differences between JavaScript, Python, Java, etc., especially useful for AI-generated validation logic.
Get your free API key and start using Test Pattern in seconds.
Get Free API Key