TechnoSuffice logo
Get a Free Quote

postinghunt@gmail.com

Free online tool

Regex Tester

Build and debug regular expressions with live highlighting, capture groups, replace preview and a library of ready-made patterns.

/ /
Test string
Matches

Replace

Regex cheat sheet
Characters
.
Any character except new line
\d
Digit 0-9
\D
Not a digit
\w
Word character (a-z, 0-9, _)
\W
Not a word character
\s
Whitespace
\S
Not whitespace
\b
Word boundary
Quantifiers
*
0 or more
+
1 or more
?
0 or 1 (optional)
{3}
Exactly 3
{2,}
2 or more
{2,5}
Between 2 and 5
*?
Lazy (as few as possible)
Groups & sets
(abc)
Capture group
(?:abc)
Non-capturing group
(?<name>abc)
Named group
[abc]
Any of a, b or c
[^abc]
Not a, b or c
[a-z]
Range
a|b
a or b
\1
Back-reference to group 1
Anchors & lookaround
^
Start of string / line
$
End of string / line
(?=abc)
Followed by abc
(?!abc)
Not followed by abc
(?<=abc)
Preceded by abc
(?<!abc)
Not preceded by abc

Regular expressions run in your browser — your text is never uploaded.

How it works

How to use the Regex Tester

01

Write a pattern

Add flags like g, i, m, s or u.

02

Paste test text

Matches are highlighted as you type.

03

Inspect groups

See every match, index and capture group.

Features

Why use our Regex Tester?

Live highlighting

Every match is highlighted instantly.

Capture groups

Numbered and named groups in a clear table.

Replace preview

Test $1, $<name> and $& replacements.

Pattern library

Email, URL, phone, IP, date, password and more.

Cheat sheet

Quick reference for tokens and quantifiers.

Share link

Copy a link that opens your pattern and text.

FAQ

Frequently asked questions

Everything you need to know about the Regex Tester.

Back to the tool

Which regex flavor is used?

JavaScript (ECMAScript) regular expressions, the same engine used in browsers and Node.js. Most syntax also works in PHP, Python and Java.

What do the flags mean?

g = find all matches, i = ignore case, m = ^ and $ match at line breaks, s = dot matches new lines, u = Unicode, y = sticky.

How do I use capture groups in replace?

Use $1, $2… for numbered groups, $<name> for named groups and $& for the whole match.

Why does my regex freeze?

Some patterns cause “catastrophic backtracking”. The tester limits the number of matches and warns you when a pattern is too slow.

Is my text sent anywhere?

No. Everything runs in your browser. The share link only includes your text if you choose to share it.

Have a project in mind? Let’s build it together.

Get a free consultation and a fixed-price quote within 24 hours.