Returns a battle-tested regex pattern for email validation via GET /v1/regex/pattern/email. Perfect for form validation in web apps or data cleaning scripts. The pattern follows RFC standards while remaining practical for real-world use. Claude Code and Cursor users can call this through MCP to avoid regex headaches.
curl "https://tinyfn.io/v1/regex/pattern/email" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/regex/pattern/email', {
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/pattern/email',
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"
}
}
}
}
Returns a RFC-compliant regex pattern that validates standard email formats like [email protected] while avoiding overly complex edge cases that break in practice.
Get the pattern from the API, then use it with RegExp: `const pattern = await fetch('/v1/regex/pattern/email'); const isValid = new RegExp(pattern).test(email);`
Yes, MCP-enabled tools like Windsurf and Cline can fetch this pattern and generate proper validation code instead of writing potentially flawed regex from memory.
The pattern supports standard ASCII domains and common international formats, but extremely complex Unicode domains may require additional validation.
Email regex is notoriously difficult to get right. This provides a tested, maintained pattern that balances RFC compliance with real-world usability.
Get your free API key and start using Get Email Pattern in seconds.
Get Free API Key