Skip to content

Regex Tester

Test regular expressions with live matches and groups.

//g

2 matches

Highlighted

Email hello@do101.online or support@example.com for help. Not an email: hello@localhost

Matches

#MatchIndexGroups
1hello@do101.online6
2support@example.com28

Cheat sheet

.
Any character except a newline
\d
A digit (0–9)
\w
A word character (letter, digit or underscore)
\s
Any whitespace
^ $
Start and end of the string (or line with the m flag)
*
Zero or more
+
One or more
?
Optional, or make a quantifier lazy
{2,5}
Between two and five times
[abc]
Any one of a, b or c
[^abc]
Any character except a, b or c
(…)
Capture group
(?:…)
Group without capturing
(?<name>…)
Named capture group
a|b
a or b
\b
Word boundary

Private by design. This tool runs entirely in your browser. Your input is processed on your own device and is not uploaded by DO101.

About the Regex Tester

Write a pattern, set the flags, and see every match highlighted in your test string along with the capture groups. Invalid patterns get a plain-English explanation rather than a cryptic engine error.

How to use it

  1. 1Type your pattern and pick flags.
  2. 2Paste a test string.
  3. 3Read the highlighted matches and the capture group table.

What you get

  • Live match highlighting
  • Numbered and named capture groups
  • All JavaScript flags: g, i, m, s, u, y
  • Catastrophic-backtracking guard with a timeout
  • Built-in cheat sheet

Frequently asked questions

Which regex flavour is this?

JavaScript (ECMAScript). Most patterns are portable, but lookbehind and named groups behave differently in older engines such as PCRE or Python.

Is my pattern executed safely?

Patterns run as regular expressions only — DO101 never evaluates your input as JavaScript code, and a timeout stops runaway backtracking from freezing the tab.

People who use this tool usually reach for these next.