Regex Cheat Sheet Basics You Can Test Live
Learn core regular expression patterns and verify them against sample text in a private browser tester. From ToolVera.
Regular expressions look cryptic until you map a few building blocks: literals, character classes, quantifiers, and anchors. Testing patterns against real strings is the fastest way to learn.
Patterns worth memorizing
- \d matches a digit; \w matches word characters.
- ^ and $ anchor the start and end of a string or line.
- + means one or more; * means zero or more; ? makes the previous token optional.
- Use parentheses to group and capture; brackets for character sets like [A-Za-z].
Test before you ship
Open Regex Tester, paste sample inputs, and iterate on the pattern until matches highlight what you expect — including edge cases with spaces, punctuation, and empty lines.
Keep a short personal cheat sheet of patterns you reuse for emails, IDs, and log lines. Re-running them in the tester beats guessing flags under deadline pressure.
Try it now
Regex Tester
Test regular expressions with live matches, indices, and capture groups.
Open Regex Tester