Skip to content

Regex Tester

Test patterns, inspect matches, preview replacements, and keep your regex workflow readable while you iterate.

Characters

.Any character (except newline)
\dDigit (0-9)
\DNot a digit
\wWord character (a-z, A-Z, 0-9, _)
\WNot a word character
\sWhitespace (space, tab, newline)
\SNot whitespace

Anchors

^Start of string (or line with m flag)
$End of string (or line with m flag)
\bWord boundary

Quantifiers

*Zero or more
+One or more
?Zero or one (optional)
{n}Exactly n times
{n,m}Between n and m times
*?Zero or more (lazy)

Groups & Lookaround

(abc)Capture group
(?:abc)Non-capturing group
(?=abc)Lookahead
(?!abc)Negative lookahead
(?<=abc)Lookbehind
a|bEither a or b

Character Classes

[abc]Any of a, b, or c
[^abc]Not a, b, or c
[a-z]Range: a through z
[0-9]Range: 0 through 9

Flags

gGlobal — find all matches
iCase insensitive
mMultiline — ^ and $ match per line
sDotall — . matches newlines too