Stop searching scattered documentation every time you forget a quantifier or flag.
Loading Regex Tester…
Full coverage of anchors, classes, quantifiers, and groups
Lookahead and lookbehind syntax with examples
All standard flags explained with real-world use cases
Copy any pattern directly into the live tester
Drop the Regex Tester into any page — blog post, product docs, intranet, school portal — with a single line of HTML. Your visitors get the full tool, processed entirely in their browser. No backend, no uploads, no signup.
Embed code
<iframe
src="https://www.fixtools.io/developer/regex-tester?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="Regex Tester by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
Regular expression syntax has remained largely stable for decades, but its density means that even experienced developers frequently forget the exact token for a behaviour they have not used recently. Is it (?<=...) or (?=...) for a lookbehind? Does {3,} mean three or more, or exactly three? A cheatsheet eliminates those questions without requiring a full documentation read. It is the difference between a five-second lookup and a two-minute context switch to a documentation site that requires further navigation to the right section. For teams onboarding developers who are new to regex, a concise cheatsheet also serves as a structured introduction: it maps the abstract concept to the concrete syntax and a minimal example in a single line, which is faster to absorb than reading a tutorial that starts from theory.
The core taxonomy of regex tokens breaks into six groups. Anchors (^, $, \b, \B) match positions rather than characters, asserting where in the string a match must occur without consuming any input. Character classes ([a-z], \d, \w, \s and their uppercase negations) describe sets of characters that can occupy a position. Quantifiers (*, +, ?, {n}, {n,m}) specify how many times the preceding token must occur. Groups ((...) and (?:...)) scope quantifiers and optionally capture substrings. Lookarounds ((?=...), (?!...), (?<=...), (?<!...)) assert surrounding context without consuming characters. Flags (g, i, m, s, u, y) modify how the engine traverses the input at a global level. Understanding which group a token belongs to resolves most syntax confusion instantly and provides the right mental model for combining tokens correctly.
For practical sessions, the most productive approach is to keep the cheatsheet open in an adjacent browser tab during any regex-heavy work. Write the pattern in the tester, look up any uncertain token in the cheatsheet, paste the cheatsheet example into the tester to confirm your understanding, then return to building your pattern. This three-tab workflow covering cheatsheet, tester, and your codebase handles the full cycle from syntax lookup to verified pattern without requiring you to leave the browser or break the development flow for a longer documentation excursion.
Cross-flavour awareness matters because regex syntax varies more across engines than newcomers expect. The shorthand classes \d, \w, and \s mean ASCII-only digits, word characters, and whitespace in JavaScript even with the u flag, but mean Unicode-aware sets in .NET and in Python under re.UNICODE which is the default in Python 3. Named-group syntax is (?<name>...) in JavaScript, .NET, and PCRE, but (?P<name>...) in Python's re module. Possessive quantifiers like a++ and atomic groups (?>...) work in Java and PCRE but throw syntax errors in JavaScript. The cheatsheet flags these differences inline so you do not waste time chasing a pattern that looks correct but was copied from a tutorial written for a different engine. When in doubt, write a tiny test case in the target language's real environment before trusting a pattern.
Open the Regex Tester alongside this cheatsheet. Copy any pattern from the reference, paste it into the tester, and test it against your real data immediately.
Step-by-step guide to regex cheatsheet, the complete pattern reference:
Identify the token category
Decide whether the behaviour you need falls under anchors (position matching), character classes (set membership), quantifiers (repetition counts), groups (scoping and capturing), lookarounds (context assertions), or flags (engine-level settings). This categorisation tells you which section of the cheatsheet to consult first and prevents you from searching the wrong area.
Find the token in the cheatsheet
Locate the relevant section of the cheatsheet and identify the specific token or syntax form you need. Read the brief explanation alongside the token to confirm it describes the behaviour you want. Copy the example pattern if one is provided: using the example as a starting point is faster than writing the syntax from memory.
Open the Regex Tester
Paste the copied example pattern into the pattern field of the live tester. This immediately confirms that the syntax is valid and shows you what the example matches. Adapt the example to your specific use case by modifying the character classes, quantifiers, or anchors in the pattern field.
Paste your test data
Enter representative strings from your project into the test string area to verify that the pattern based on the cheatsheet example behaves as the documentation describes. If it does not, return to the cheatsheet to check whether a flag or additional syntax modification is required for your specific context.
Common situations where this approach makes a real difference:
Confirming the syntax for a word boundary anchor
A developer wants to match the word "cat" only as a standalone word, not as a substring inside "concatenate" or "scatter". Looking up \b in the cheatsheet confirms it matches a zero-width word boundary between a word character and a non-word character. The pattern \bcat\b is pasted into the tester against "I have a cat and a concatenation problem". Only the standalone "cat" is highlighted, with no match inside "concatenation", confirming the anchor behaves as documented and the pattern is ready for the search feature.
Looking up how to match one or more digits non-greedily
A developer processing HTML attribute values needs to match the shortest sequence of digits between quotation marks, not the longest span across multiple attributes. The cheatsheet shows that \d+? is the lazy variant of \d+. Testing the string height="100" width="200" with the pattern "\d+?" in the tester confirms each digit group is captured individually as 100 and 200 rather than the engine greedily spanning from 100 to 200 as a single long match.
Checking lookahead syntax for a password strength rule
A security engineer needs a pattern that only matches if a string contains at least one uppercase letter and at least one digit, without consuming characters or prescribing their positions. The cheatsheet shows (?=.*[A-Z]) and (?=.*\d) as positive lookahead forms. Combining them into ^(?=.*[A-Z])(?=.*\d).{8,}$ and testing against sample passwords of varying strength in the tester confirms that the rule correctly enforces both requirements simultaneously without restricting where in the string the uppercase letter or digit appears.
Teaching a junior developer the difference between * and +
A tech lead uses the cheatsheet during a code review to explain why \d* matched an empty string at a position where \d+ was clearly the intended choice. The cheatsheet entry shows that * means zero or more occurrences while + means one or more and requires at least one match. Testing both patterns against an empty string in the tester makes the difference immediately visual: \d* highlights the empty position while \d+ produces no match. The demonstration takes under 30 seconds and cements the concept far more effectively than a verbal explanation.
Use this page when you need a quick lookup for regex syntax, want to confirm the exact token for a behaviour, or are introducing a colleague to regular expressions for the first time.
Get better results with these expert suggestions:
Group cheatsheet tokens by what they match versus what they assert
Tokens that consume characters (character classes, literals, quantified groups) behave fundamentally differently from tokens that assert position (anchors, lookarounds). Keeping this distinction in mind when reading a cheatsheet prevents a common mistake: attempting to quantify an anchor such as writing ^+ or \b?, which has no meaningful effect because anchors match zero-width positions and do not consume input that a quantifier could count.
Learn the six flags before the advanced token types
The g, i, m, s, u, and y flags change how the entire engine processes input, not just individual tokens. Misunderstanding flag behaviour accounts for a disproportionately large share of "my pattern works in the tester but not in my code" issues. Mastering what each flag does and when each is appropriate resolves an entire category of subtle bugs before they are written, making flag knowledge one of the highest-return topics in the cheatsheet.
Use the cheatsheet to review unfamiliar patterns from colleagues
When reviewing code containing a regex pattern you do not immediately recognise, cross-reference each unfamiliar token against the cheatsheet before asking a question. This practice builds pattern-reading fluency over time, usually resolves the uncertainty in under a minute, and avoids interrupting the original author for explanations that the cheatsheet can provide faster.
Bookmark the cheatsheet alongside the live tester
Keep both the cheatsheet page and the regex tester open in adjacent browser tabs during any session where you are writing or reviewing patterns. The lookup-and-verify cycle takes under 30 seconds per uncertain token and is far faster than navigating a search engine, reading a tutorial page, and returning to your work. The proximity of the two tools in adjacent tabs is what makes the habit practical.
More use-case guides for the same tool:
Open the full Regex Tester — free, no account needed, works on any device.
Open Regex Tester →Free · No account needed · Works on any device