Regex Cheatsheet
A searchable reference of regular expression syntax: anchors, classes, quantifiers, groups, lookarounds, escapes and flags.
Search regex syntax
Showing 0 entries
How to use the Regex Cheatsheet
- Type a keyword such as anchor, quantifier or lookahead in the search box.
- Scan the matching rows for the syntax you need.
- Copy the syntax or example into your own pattern.
Features
- Anchors, character classes and quantifiers
- Groups, backreferences and alternation
- Lookahead and lookbehind assertions
- Escapes and all common flags
Advertisement
Frequently Asked Questions
Common questions about the free online regex cheatsheet.
A regular expression is a pattern of characters that describes a set of strings, used for
matching and replacing text.
The caret matches the start of the input, or the start of each line when the multiline flag
is enabled.
A star matches the previous item zero or more times, while a plus requires at least one
occurrence.
Adding a question mark after a quantifier makes it match as few characters as possible, so
the plus becomes lazy.
Parentheses group part of a pattern and save the matched text so it can be reused or
extracted separately.
A lookahead checks what comes next without consuming it, so the match position stays where it
was.
The syntax shown follows the JavaScript regular expression flavour, which is very close to
PCRE and Python.
The global flag makes the pattern search for every match in the subject instead of stopping
after the first hit.
Yes. It is completely free, needs no account and keeps working offline once the page has
loaded.
Last updated: October 10, 2026