Email (Simple) Email Basic email validation pattern
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}Example: [email protected] 
Email (RFC 5322) Email RFC 5322 compliant email pattern
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])Example: [email protected] 
Email (Gmail) Email Match Gmail addresses specifically
[a-zA-Z0-9._%+-]+@gmail\.comExample: [email protected] 
URL (HTTP/HTTPS) URL Match HTTP and HTTPS URLs
https?://[\w\-]+(\.[\w\-]+)+[/#?]?.*Example: https://www.example.com/path?query=value
URL (All Protocols) URL Match URLs with various protocols
(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]Example: ftp://files.example.com/document.pdf
URL (Domain Only) URL Extract domain name from URL
(?:https?://)?(?:www\.)?([a-zA-Z0-9-]+\.[a-zA-Z]{2,})Example: www.example.com or https://example.com
URL (Query Parameters) URL Match URL query parameters
[?&]([^=&]+)=([^&]*)Example: ?name=value&foo=bar
US Phone Number Phone US phone number (various formats)
\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}Example: (555) 123-4567 or 555-123-4567
International Phone Phone International phone number (E.164 format)
\+?[1-9]\d{1,14}Example: +1234567890
US Phone (Strict) Phone US phone in format (555) 123-4567
^\(\d{3}\) \d{3}-\d{4}$Example: (555) 123-4567
UK Phone Number Phone UK phone number with various formats
^(?:(?:\(?(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?(?:\(?0\)?[\s-]?)?)|(?:\(?0))(?:(?:\d{5}\)?[\s-]?\d{4,5})|(?:\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3}))|(?:\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4})|(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}))(?:[\s-]?(?:x|ext\.?|\#)\d{3,4})?$Example: +44 20 7123 4567
Date (MM/DD/YYYY) Date US date format MM/DD/YYYY
(0[1-9]|1[0-2])/(0[1-9]|[12]\d|3[01])/(19|20)\d{2}Example: 12/31/2024
Date (DD/MM/YYYY) Date European date format DD/MM/YYYY
(0[1-9]|[12]\d|3[01])/(0[1-9]|1[0-2])/(19|20)\d{2}Example: 31/12/2024
Date (ISO 8601) Date ISO 8601 date format YYYY-MM-DD
\d{4}-\d{2}-\d{2}Example: 2024-12-31
Date (YYYY/MM/DD) Date Date format YYYY/MM/DD
(19|20)\d{2}/(0[1-9]|1[0-2])/(0[1-9]|[12]\d|3[01])Example: 2024/12/31
Time (24-hour) Date 24-hour time format HH:MM
([01]\d|2[0-3]):[0-5]\dExample: 23:59 or 09:30
Time (12-hour) Date 12-hour time format with AM/PM
(0?\d|1[0-2]):[0-5]\d\s?(AM|PM|am|pm)Example: 11:30 PM or 9:15 am
DateTime (ISO 8601) Date ISO 8601 datetime format
\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?Example: 2024-12-31T23:59:59.000Z
IPv4 Address IP IPv4 address validation
\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\bExample: 192.168.1.1
IPv6 Address IP IPv6 address (full format)
(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 Address (Compressed) IP IPv6 with compression support
(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))Example: 2001:db8::8a2e:370:7334
CIDR Notation (IPv4) IP IPv4 CIDR notation
\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)/([0-9]|[1-2][0-9]|3[0-2])\bExample: 192.168.1.0/24
MAC Address IP MAC address (colon or hyphen separated)
([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})Example: 00:1B:63:84:45:E6 or 00-1B-63-84-45-E6
Credit Card (Generic) Payment Generic credit card format
\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}Example: 4532-1234-5678-9012
Visa Card Payment Visa credit card (starts with 4)
4\d{3}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}Example: 4532-1234-5678-9012
Mastercard Payment Mastercard (starts with 51-55)
5[1-5]\d{2}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}Example: 5425-2334-3010-9903
American Express Payment American Express (15 digits)
3[47]\d{2}[\s-]?\d{6}[\s-]?\d{5}Example: 3782-822463-10005
CVV Code Payment Credit card CVV (3-4 digits)
^\d{3,4}$Example: 123 or 1234
Password (8+ chars, mixed) Password At least 8 characters with uppercase, lowercase, and number
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$Example: Password123
Password (Strong) Password Strong password with special characters
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$Example: Pass@word123
Password (Very Strong) Password Very strong password (12+ chars with all types)
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{12,}$Example: MyP@ssw0rd2024!
HTML Tag HTML Match HTML tags (including multiline content)
<([a-z]+)([^<>]*?)(?:>([\s\S]*?)<\/\1>|\s*\/>)Example: <div class="container">Content</div>
HTML Comment HTML Match HTML comments
<!--[\s\S]*?-->Example: <!-- This is a comment -->
HTML Attributes HTML Match HTML attributes
([a-z-]+)="([^"]*)"Example: class="container" id="main"
Self-Closing Tags HTML Match self-closing HTML tags
<([a-z]+)([^>]*)\/?>Example: <img src="..." /> or <br>
Hex Color Color Hex color code (#RGB or #RRGGBB)
#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})\bExample: #FF5733 or #F57
RGB Color Color RGB color format
rgb\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*\)Example: rgb(255, 87, 51)
RGBA Color Color RGBA color format with alpha
rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*(?:0|1|0?\.\d+)\s*\)Example: rgba(255, 87, 51, 0.5)
HSL Color Color HSL color format
hsl\(\s*\d{1,3}\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%\s*\)Example: hsl(9, 100%, 60%)
Image Files Files Common image file extensions
\.(?:jpg|jpeg|png|gif|bmp|svg|webp|ico)$Example: photo.jpg or image.png
Document Files Files Common document file extensions
\.(?:pdf|doc|docx|txt|rtf|odt|xls|xlsx|ppt|pptx)$Example: document.pdf or spreadsheet.xlsx
Video Files Files Common video file extensions
\.(?:mp4|avi|mkv|mov|wmv|flv|webm)$Example: video.mp4 or movie.mkv
Audio Files Files Common audio file extensions
\.(?:mp3|wav|flac|aac|ogg|m4a|wma)$Example: song.mp3 or audio.wav
Archive Files Files Common archive file extensions
\.(?:zip|rar|7z|tar|gz|bz2)$Example: archive.zip or backup.tar.gz
Code Files Files Common programming file extensions
\.(?:js|jsx|ts|tsx|py|java|cpp|c|h|cs|php|rb|go|rs)$Example: script.js or component.tsx
Username Text Username (3-16 alphanumeric, underscore, hyphen)
^[a-zA-Z0-9_-]{3,16}$Example: user_name-123
URL Slug Text URL-friendly slug (lowercase, hyphens)
^[a-z0-9]+(?:-[a-z0-9]+)*$Example: my-blog-post-title
UUID v4 Text UUID version 4 format
[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}Example: 123e4567-e89b-42d3-a456-426614174000
US SSN Text US Social Security Number
\d{3}-\d{2}-\d{4}Example: 123-45-6789
US ZIP Code Text US ZIP code (5 or 9 digits)
\d{5}(?:-\d{4})?Example: 12345 or 12345-6789
Canadian Postal Code Text Canadian postal code format
[A-Z]\d[A-Z]\s?\d[A-Z]\dExample: K1A 0B1
UK Postcode Text UK postcode format
[A-Z]{1,2}\d{1,2}[A-Z]?\s?\d[A-Z]{2}Example: SW1A 1AA
Integer Numbers Positive or negative integer
^-?\d+$Example: -42 or 123
Decimal Number Numbers Decimal number
^-?\d+\.\d+$Example: -3.14 or 2.71
Number (Integer or Decimal) Numbers Integer or decimal number
^-?\d+(?:\.\d+)?$Example: 42 or 3.14
US Currency Numbers US currency format
\$\d{1,3}(?:,\d{3})*(?:\.\d{2})?Example: $1,234.56
Percentage Numbers Percentage value
\d+(?:\.\d+)?%Example: 50% or 33.33%
Scientific Notation Numbers Scientific notation
-?\d+(?:\.\d+)?[eE][+-]?\d+Example: 1.23e-4 or -5.67E+10
Roman Numerals Numbers Roman numerals (1-3999)
^M{0,3}(?:CM|CD|D?C{0,3})(?:XC|XL|L?X{0,3})(?:IX|IV|V?I{0,3})$Example: MCMXCIV or XIV
Twitter Handle Social Twitter/X username handle
@[A-Za-z0-9_]{1,15}Example: @username
Instagram Handle Social Instagram username handle
@[A-Za-z0-9_.]{1,30}Example: @user.name_123
Hashtag Social Social media hashtag
#[A-Za-z0-9_]+Example: #HashTag
YouTube Video ID Social Extract YouTube video ID
(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})Example: youtube.com/watch?v=dQw4w9WgXcQ
Bitcoin Address Crypto Bitcoin wallet address (legacy)
^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$Example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
Ethereum Address Crypto Ethereum wallet address
^0x[a-fA-F0-9]{40}$Example: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb
Variable Name (Camel Case) Code camelCase variable name
^[a-z][a-zA-Z0-9]*$Example: myVariableName
Variable Name (Snake Case) Code snake_case variable name
^[a-z][a-z0-9_]*$Example: my_variable_name
Class Name (Pascal Case) Code PascalCase class name
^[A-Z][a-zA-Z0-9]*$Example: MyClassName
JavaScript Function Code Match JavaScript function declarations
function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(Example: function myFunction(
Arrow Function Code Match arrow function declarations
(?:const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=\s*\([^)]*\)\s*=>Example: const myFunc = () =>
Import Statement Code Match ES6 import statements
import\s+(?:{[^}]+}|[a-zA-Z_$][a-zA-Z0-9_$]*)\s+from\s+['"][^'"]+['"]Example: import React from "react"
Single Line Comment Code Single line comment (// style)
\/\/.*$Example: // This is a comment
Multi-line Comment Code Multi-line comment (/* */ style)
\/\*[\s\S]*?\*\/Example: /* This is a
multi-line comment */
Markdown Headers Markdown Markdown headers (H1-H6)
^#{1,6}\s+(.+)$Example: # Header 1 or ## Header 2
Markdown Links Markdown Markdown link format
\[([^\]]+)\]\(([^\)]+)\)Example: [Link Text](https://example.com)
Markdown Images Markdown Markdown image format
!\[([^\]]*)\]\(([^\)]+)\)Example: 
Markdown Code Blocks Markdown Markdown fenced code blocks
```[\s\S]*?```Example: ```javascript
code here
```
Markdown Inline Code Markdown Markdown inline code
`[^`]+`Example: `inline code`
SQL Injection Pattern Security Detect potential SQL injection keywords
(\b(SELECT|INSERT|UPDATE|DELETE|DROP|CREATE|ALTER)\b)Example: SELECT * FROM users
XSS Pattern (Script Tags) Security Detect script tags (XSS)
<script[^>]*>.*?<\/script>Example: <script>alert("XSS")</script>
Base64 Encoded Security Base64 encoded string
^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$Example: SGVsbG8gV29ybGQ=
JWT Token Security JSON Web Token format
eyJ[A-Za-z0-9-_=]+\.eyJ[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
API Key Pattern Security Detect API key assignments
[Aa][Pp][Ii]_?[Kk][Ee][Yy]\s*[:=]\s*['"]?([a-zA-Z0-9_\-]{20,})['"]?Example: API_KEY = "abc123xyz..."
Windows File Path Path Windows file path
[A-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*Example: C:\Users\Username\file.txt
Unix File Path Path Unix/Linux file path
\/(?:[^/\0]+\/)*[^/\0]*Example: /home/user/file.txt
Relative Path Path Relative file path
\.{1,2}\/(?:[^\/]+\/)*[^\/]*Example: ../folder/file.txt or ./file.txt
Whitespace Only Text Match lines with only whitespace
^\s+$Example:    
Empty Lines Text Match empty lines
^\s*$Example: 
Duplicate Words Text Find duplicate consecutive words
\b(\w+)\s+\1\bExample: the the
Version Number (Semver) Text Semantic version number
\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?Example: 1.2.3 or 2.0.0-beta.1