The complete guide to matching email addresses with regex in JavaScript, Python, and PCRE. Includes the pattern, edge cases, and why no regex is truly perfect.
How to match http and https URLs with regex — a practical pattern, what it catches, and when to use a URL parser instead.
Phone number regex patterns for US, international, and E.164 format. Why phone validation by regex is harder than email.
Regex patterns for ISO dates, US dates (MM/DD/YYYY), European (DD/MM/YYYY), and date-times. Including leap year warnings.
Step-by-step: validate Aadhaar format with regex, then verify the Verhoeff checksum in Python.
Use regex to find all PAN card numbers in a document or chat log. Code in Python and JavaScript.
Date regex patterns for ISO, MM/DD/YYYY, DD/MM/YYYY, and natural-language formats.
A practical URL-matching regex that covers https, http, and bare domains.
A regex that rejects 256.1.1.1 and other out-of-range octets, plus when to skip strictness.
Extract integers, decimals, negative numbers, and currency from any string using regex. Examples in JavaScript and Python.
How to escape regex metacharacters when you want to match them literally. Reference table and language-specific helpers.
How to match text between two specific strings using regex. Multiple approaches with greedy, lazy, and lookaround alternatives.
How to match any character except specific ones with regex using negated character classes. Examples with quotes, brackets, and patterns.
Strip emojis from user input in JavaScript, Python, and Go.
Quick regex recipes for parsing social-media-style markup in any language.
Why regex for CSV is mostly wrong, but a few patterns that do work for simple cases.
A classic regex use of back-references — and a couple of subtle gotchas.
Quick HTML-tag-strip recipes, and why you should usually use a parser instead.
Use regex to redact card numbers in logs and displays — show only the last 4 digits.
A loose regex that catches phone numbers in multiple countries, plus when to use libphonenumber instead.
A one-line regex that normalizes whitespace, plus what to watch for.
A regex for double- or single-quoted strings that handles escaped quotes inside.
A simple lazy regex captures content between two markers — but watch the boundary cases.
Pull the extension off a path or filename, with handling for multi-part extensions.
A regex for strong passwords (uppercase + lowercase + digit + symbol + length) — and why you should think twice about it.
The difference between greedy and lazy regex quantifiers, with real examples and how to choose between them.
The \b in regex is a word boundary — a zero-width assertion that matches positions between word and non-word characters. Examples and gotchas.
Non-capturing groups in regex — what (?:) does, when to use it, and how it differs from a regular capturing group.
When to use lookahead (?=...) vs lookbehind (?<=...) in regex. Side-by-side examples, performance notes, and flavor support.
How regex backreferences work — match the same text again, find repeated words, validate matching tags, and more.
Why "." doesn't match newlines by default, and how to fix it with the dotall flag (s) in JavaScript, Python, and other languages.
How to use named capture groups in regex. Syntax differences between JavaScript and Python, how to access matched values, and when to use named over numbered.
Why some regex patterns are slow or hang on certain inputs. Diagnosing nested quantifiers, catastrophic backtracking, and performance fixes.
ReDoS is a class of attack where a malicious regex pattern or input causes exponential CPU consumption. How it works, how to detect, and how to prevent.
How to make a regex case insensitive in JavaScript, Python, Java, PHP, Go, and other languages. Including inline case modifiers.
The seven key differences between Python and JavaScript regex flavors: named groups, lookbehinds, flags, raw strings, and more.
Complete reference of regex flags in JavaScript, Python, Java, Go, Ruby, and PCRE. Includes case insensitive, multiline, dotall, sticky, and Unicode.
One-page regex reference: anchors, character classes, quantifiers, groups, lookarounds, flags.
Subtle bugs developers make with regex — greedy vs lazy, anchors, escaping, Unicode, and more.