Free Regex Tester — Live Match Highlighting
Expression
//g
Global
Quick Reference
Character Classes
. — Any character (except newline)
\d — Digit [0-9]
\D — Not a digit
\w — Word character [a-zA-Z0-9_]
\W — Not a word character
\s — Whitespace
\S — Not whitespace
[abc] — Any of a, b, or c
[^abc] — Not a, b, or c
[a-z] — Character range
Quantifiers
* — 0 or more
+ — 1 or more
? — 0 or 1
{n} — Exactly n times
{n,} — n or more times
{n,m} — Between n and m times
*? — Lazy quantifier
Anchors & Boundaries
^ — Start of string/line
$ — End of string/line
\b — Word boundary
\B — Not word boundary
Groups & Lookaround
(abc) — Capturing group
(?:abc) — Non-capturing group
(?=abc) — Positive lookahead
(?!abc) — Negative lookahead
\1 — Backreference to group 1
Replacement Patterns
$& — Entire match
$1, $2 — Captured groups
$` — Text before match
$' — Text after match
12 matches
The Quick Brown Fox jumps over the Lazy Dog.
Alice and Bob met at the Park on Saturday.
Regular Expressions are powerful tools for text processing.
Match Details
#1
"The"idx 0#2
"Quick"idx 4#3
"Brown"idx 10#4
"Fox"idx 16#5
"Lazy"idx 35#6
"Dog"idx 40#7
"Alice"idx 45#8
"Bob"idx 55#9
"Park"idx 70#10
"Saturday"idx 78#11
"Regular"idx 88#12
"Expressions"idx 96