??MODOO

Regex TesterLive 쨌 Match 쨌 Replace 쨌 Library

Build and test JavaScript regular expressions with live match highlighting and a library of common patterns.

Pattern
/ /
Test string
Highlighted
Matches & groups
Replace
Common patterns (click to use)

Flags Reference

gGlobal ??find all matches, not just the first.
iCase-insensitive.
mMultiline ??^ and $ match line starts/ends.
sDotall ??. matches newlines too.
uUnicode ??proper handling of code points above U+FFFF.
ySticky ??match starts only from lastIndex.
dProvides indices for matches (modern engines).

Cheat Sheet

.Any character except newline (unless s flag)
\dDigit; \D non-digit
\wWord char [A-Za-z0-9_]; \W non-word
\sWhitespace; \S non-whitespace
^ / $Start / end of string (or line with m flag)
\bWord boundary
[abc]Character class ??a, b, or c
[^abc]Anything except a, b, c
a|bAlternation ??a OR b
(...)Capture group
(?:...)Non-capture group
(?<name>...)Named group
(?=...)Positive lookahead
(?!...)Negative lookahead
* + ?0+, 1+, 0 or 1; append ? for lazy
{n,m}Between n and m repetitions

Notes

This tester uses the browser's native JavaScript regex engine. It differs from Perl, Python, PCRE, and other dialects in a few ways ??no possessive quantifiers, no atomic groups, and limited support for some Unicode property escapes in older engines.