Regex Tester

Test regular expressions live with match highlighting and a cheat sheet.

100% client-side Instant results Free forever Nothing uploaded

Regex cheat sheet
\d \w \sdigit, word char, whitespace^ $start, end of line
+ * ?1+, 0+, optional{2,5}2 to 5 repetitions
[abc] [^abc]char set, negated set(x|y)x or y, capture group
\bword boundary(?=x) (?!x)lookahead, negative

About the Regex Tester

Write a regular expression and test it against your sample text with live match highlighting, a numbered match list with capture groups, flag toggles (g, i, m, s) and a built-in cheat sheet.

Iterating on a regex with instant visual feedback is dramatically faster than trial-and-error in code.

How to use the Regex Tester

  1. Enter your pattern and choose flags.
  2. Paste test text — matches highlight instantly.
  3. Review the match list with capture groups; consult the cheat sheet as needed.

Common uses

Building validation patterns (emails, phones) Extracting data from logs Learning regex interactively

Frequently asked questions

Which regex flavor is used?
JavaScript (ECMAScript) — the same engine as Node.js and browsers.
What do the flags mean?
g = all matches, i = case-insensitive, m = ^ and $ match per line, s = dot matches newlines.
Why does my regex freeze on some inputs?
Nested quantifiers can cause catastrophic backtracking. Keep patterns specific and avoid stacking .* inside groups.

Related tools