正規表現スニペット集
すぐに使える正規表現パターン集。日本語・英語対応。
🇯🇵 日本語
ひらがなにマッチする正規表現
日本語のひらがな(あ〜ん)にマッチする正規表現パターンです。
カタカナにマッチする正規表現
日本語のカタカナ(ア〜ン)にマッチする正規表現パターンです。
日本の郵便番号にマッチする正規表現
日本の郵便番号(例:123-4567)にマッチする正規表現です。
日本の電話番号にマッチする正規表現
日本の電話番号(例:090-1234-5678)にマッチする正規表現です。
漢字にマッチする正規表現
日本語の漢字(CJK統合漢字)にマッチする正規表現パターンです。
全角数字にマッチする正規表現
全角数字(0〜9)にマッチする正規表現パターンです。
全角英字にマッチする正規表現
全角アルファベット(A〜Z、a〜z)にマッチする正規表現パターンです。
日本語の日付にマッチする正規表現
YYYY年MM月DD日 形式の日付にマッチする正規表現です。
都道府県にマッチする正規表現
日本の都道府県名にマッチする正規表現パターンです。
日本人名(姓名)にマッチする正規表現
漢字2〜4文字の日本人名にマッチする正規表現パターンです。
元号(令和・平成など)にマッチする正規表現
日本の元号(令和・平成・昭和・大正・明治)と年数にマッチする正規表現です。
🌐 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.