Returns precise regex patterns for UUID validation across different versions (v1, v4, v5) and formats. Access via MCP in Cursor or Windsurf for instant pattern generation, or hit GET /v1/regex/pattern/uuid directly. Example: gets `^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$` for standard UUID validation. Supports both strict RFC 4122 compliance and common variations.
curl "https://tinyfn.io/v1/regex/pattern/uuid" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/regex/pattern/uuid', {
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/uuid',
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 the standard pattern: `^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$` which enforces the version 4 bit in the correct position and valid variant bits.
Call the tool from Cursor or Claude Code to get patterns instantly, then use them in your validation logic. Perfect for AI agents building form validators or API input sanitization without regex guesswork.
The default pattern uses lowercase hex digits [0-9a-f]. For case-insensitive matching, use the `(?i)` flag or request the case-insensitive variant which uses [0-9a-fA-F].
Yes, specify the format parameter to get patterns for hex-only UUIDs like `^[0-9a-f]{32}$` for validation of compact UUID strings without separator hyphens.
Strict patterns enforce version bits and variant bits exactly per RFC 4122. Relaxed patterns accept any valid hex digits in those positions, useful for legacy systems or non-standard UUID implementations.
Get your free API key and start using Get Uuid Pattern in seconds.
Get Free API Key