Regex Tester

Search Engine Optimization

Regex Tester

Build and debug regular expressions with live highlighting

Type a pattern, pick your flags, and paste a test string. Matches, capture groups, and replacements update instantly — all in your browser.

/
g global i ignore case m multiline s dot all u unicode y sticky
Runs entirely in your browser — nothing you type is sent to a server.
Highlighted matches 0 matches
Your test string with highlighted matches will appear here.
Find & replace
The replaced text will appear here.
Regex cheat sheet
^Start of string (or line, with the m flag)
$End of string (or line, with the m flag)
\bWord boundary
\BNot a word boundary
.Any character except line break
\dAny digit (0–9)
\DAny non-digit
\wWord character (letters, digits, underscore)
\WNon-word character
\sWhitespace character
\SNon-whitespace character
[abc]Any one of a, b, or c
[^abc]Any character except a, b, or c
[a-z]Any character in the range a to z
*0 or more times
+1 or more times
?0 or 1 time (also makes a quantifier lazy)
{n}Exactly n times
{n,}n or more times
{n,m}Between n and m times
(abc)Capturing group
(?:abc)Non-capturing group
(?<name>abc)Named capturing group
a|bMatches a or b
(?=abc)Positive lookahead
(?!abc)Negative lookahead
(?<=abc)Positive lookbehind
(?<!abc)Negative lookbehind
gGlobal — find all matches, not just the first
iIgnore case
mMultiline — ^ and $ match line boundaries
sDot all — . also matches line breaks
uUnicode — treat pattern as a sequence of code points
ySticky — match only from lastIndex

About Regex Tester

Regex Tester lets you build, test, and debug regular expressions right in your browser. Type or paste a pattern, choose the flags you need (global, case-insensitive, multiline, dot-all, unicode, sticky), and enter a test string — every match is highlighted instantly with its index and any capture groups listed below. There is also a quick Find & Replace panel to preview a substitution before you use it in your own code, a one-click library of common patterns (email, URL, IP address, phone number, hex color, date), and a handy regex cheat sheet covering anchors, character classes, quantifiers, and groups. Everything runs locally in your browser, so nothing you type is ever sent to a server.



Update cookies preferences