Regex Tester — Live Regular Expression Evaluator
// regular expression evaluator
Test and debug regular expressions in real-time. Matches are highlighted inline, capture groups are inspected per-match, and substitution runs live. Everything evaluates locally — no server, no tracking.
pattern
/
/
matches 0
groups 0
flags g
test string
0 chars
matches
Matches will appear here…
substitution (replace)
→
common patterns
regex cheat sheet
click any row to insert pattern
anchors
^ Start of string (or line with m flag)
$ End of string (or line with m flag)
\b Word boundary
\B Non-word boundary
character classes
. Any character except newline
\d Digit [0-9]
\D Non-digit
\w Word char [a-zA-Z0-9_]
\W Non-word character
\s Whitespace (space, tab, newline…)
\S Non-whitespace
[abc]Character set — a, b or c
[^abc]Negated set — not a, b or c
[a-z]Range — a through z
quantifiers
* 0 or more (greedy)
+ 1 or more (greedy)
? 0 or 1 (optional)
{3} Exactly 3 times
{3,}3 or more times
{3,6}Between 3 and 6 times
*? 0 or more (lazy)
+? 1 or more (lazy)
groups & references
(abc) Capturing group — backreference via $1
(?:abc) Non-capturing group
(?<n>abc)Named capturing group
\1 Backreference to group 1
a|b Alternation — a or b
lookaround
(?=abc) Positive lookahead — followed by abc
(?!abc) Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind
escapes & special
\n Newline
\t Tab
\r Carriage return
\0 Null character
\\ Literal backslash
\. Literal dot (escape metacharacter)