Password Generator
Strong random passwords and passphrases, generated locally.
Every regex token, searchable, with an example of what it matches.
A searchable regular expression reference where every token comes with a worked example — because knowing that \b exists tells you nothing about what it matches.
A complete reference for regular expression syntax, searchable by the token itself or by what you are trying to do. Every entry has an example, because the syntax is only half the problem — knowing that \b exists does not tell you what it matches.
It covers character classes, quantifiers and their lazy forms, anchors, groups both capturing and not, lookahead and lookbehind in all four directions, backreferences, Unicode property escapes and every flag. The distinctions that cause the most confusion are called out: greedy against lazy, the dot not matching a newline by default, and why a dot inside a character class is just a dot. A set of ready-made patterns for email, URLs, dates and postcodes comes with it.
A pattern, what it matches and — just as usefully — what it does not.
Type "start of line" or "optional" rather than having to already know the symbol.
Greedy against lazy, the dot not matching newlines, and why a dot inside a character class is just a dot.
Positive and negative, ahead and behind, with an example of each and a note on where lookbehind is unsupported.
Email, URL, date, postcode and more — each with the caveat that goes with it, since none of them is truly complete.
Type the syntax, or describe what you want to match.
Each entry shows a pattern and what it does and does not match.
Classes, quantifiers, anchors, groups, lookaround or flags.
Common patterns for email, URLs, dates and more, with their caveats.
A greedy quantifier takes as much as it can and gives back only when forced; a lazy one, written with a trailing ?, takes as little as possible. On <.+> against two tags, greedy matches both and lazy matches the first.
Because it never does by default — that is the one exception to "any character". The s flag, sometimes called dotall, changes it.
A position, not a character: the boundary between a word character and a non-word one. That is why \bcat\b matches cat in "the cat sat" but not in "concatenate".
Not reliably. HTML nests arbitrarily and regular expressions cannot count, so any pattern breaks on a case you did not anticipate. Use a parser — the HTML to Markdown and formatter tools here both do.
What people who use the Regex Cheatsheet think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Regex Cheatsheet. It takes half a minute and no account.
Write the first reviewStrong random passwords and passphrases, generated locally.
Generate a production Dockerfile with multi-stage builds and layer caching.
Build a cron schedule from controls and see the next times it runs.
Convert HTML back into clean Markdown, keeping lists, tables and code.
Convert a date into every ISO 8601 form, including week and ordinal dates.
Serialise a JSON object into a percent-encoded URL query string.
Flatten a JSON config into .env lines with correct quoting and naming.
Verify a download by computing its SHA-256 without uploading it anywhere.