正規表現スニペット集

すぐに使える正規表現パターン集。日本語・英語対応。

🇯🇵 日本語

🌐 English

Email Address Regex
Matches standard email addresses like user@example.com.
URL Regex
Matches http and https URLs.
Credit Card Number Regex
Matches major credit card numbers (Visa, Mastercard, Amex) with or without dashes.
IPv4 Address Regex
Matches valid IPv4 addresses like 192.168.1.1.
Hex Color Code Regex
Matches CSS hex color codes like #fff or #ffffff.
URL Slug Regex
Matches URL-friendly slugs using lowercase letters, numbers, and hyphens.
Strong Password Regex
Matches passwords with at least 8 chars, uppercase, lowercase, number, and special character.
Semantic Version Regex
Matches semantic versioning strings like 1.0.0 or 2.3.1-beta.
JWT Token Regex
Matches JSON Web Tokens (three base64url segments separated by dots).
Markdown Link Regex
Matches Markdown hyperlinks in [text](url) format.
HTML Tag Regex
Matches HTML opening and closing tags.
ISO 8601 Date Regex
Matches ISO 8601 date format: YYYY-MM-DD.
Time Format Regex (HH:MM)
Matches 24-hour time format like 09:30 or 23:59.
File Extension Regex
Matches common file extensions like .jpg, .png, .pdf, .js.
Git Commit Hash Regex
Matches full (40-char) or short (7-char) Git commit hashes.
Log Level Regex
Matches common log levels: DEBUG, INFO, WARN, ERROR, FATAL.
MAC Address Regex
Matches MAC addresses in colon or hyphen notation.
US Phone Number Regex
Matches US phone numbers in various formats.
UUID Regex
Matches UUID v4 format strings.
Base64 String Regex
Matches Base64 encoded strings.
Environment Variable Regex
Matches environment variable declarations like KEY=value.
Twitter / X Mention Regex
Matches @username mentions in tweets or social posts.
Hashtag Regex
Matches hashtags used in social media posts.
DOI (Academic Paper) Regex
Matches Digital Object Identifiers used in academic publications.
SQL Injection Pattern Regex
Detects common SQL injection patterns for input validation.
camelCase to snake_case Regex
Matches uppercase letters in camelCase for conversion to snake_case.
Content Between HTML Tags Regex
Extracts text content between opening and closing HTML tags.
Repeated Words Regex
Detects consecutive duplicate words in text.
Positive Lookahead Regex
Matches words followed by a specific pattern using positive lookahead.
Negative Lookahead Regex
Matches words NOT followed by a specific pattern using negative lookahead.
Named Capture Group Regex
Uses named groups to extract year, month, day from a date string.
Non-Greedy Match Regex
Uses non-greedy quantifier to match the shortest possible string.
Multiline Mode Regex
Uses multiline flag to match start/end of each line.
Korean Characters Regex
Matches Korean Hangul characters.
Arabic Characters Regex
Matches Arabic script characters.
Whitespace Normalization Regex
Matches multiple consecutive whitespace characters for normalization.
Empty Lines Regex
Matches empty or whitespace-only lines for removal.
International Phone Number Regex
Matches international phone numbers with country codes.
Currency Amount Regex
Matches currency amounts with optional symbol and decimal.