Regex Tester

Build, test and debug regular expressions in real time. Type a pattern, see every match highlight as you type, and inspect capture groups.

/ /
TEST STRING
MATCHES

Enter a pattern to see matches.

. any character
\d \w \s digit / word char / whitespace
[abc] [^abc] set / negated set
a-z range inside a set
+ * one-or-more / zero-or-more
? optional (zero-or-one)
{n,m} between n and m times
*? +? lazy: as few as possible
(...) capture group
(?:...) non-capturing group
| alternation (or)
\1 $1 backreference / replacement
\b word boundary
^ $ start / end (line with m flag)
(?=...) (?<=...) look-ahead / look-behind
g i m s flags: global / ignore / multiline / dotall

Want to actually understand these? The free course takes you from zero to cracked, one interactive lesson at a time.