Skip to content
ToolsOnDuty - free online tools
Developer Tools

Regex Tester

Test regular expressions against text and see every match live.

Free browser toolRuns in your browserNo sign-up
Pattern testing laboratory

Build and test JavaScript regular expressions live

Enter a pattern, control execution flags and inspect every match, index and capture group against local test data.

Waiting

pattern

—

matches

g

active flags

Expression

JavaScript RegExp syntax
//g
Flags

Test data

0 characters

Match inspector

Live results
Enter a pattern to start live testing.
Private by design. Input is processed inside this browser tab and is not sent to ToolsOnDuty.

Common JavaScript regex tokens

\d
Any digit from 0 to 9.
\w
Any word character: a letter, digit or underscore.
\s
Any whitespace, such as a space, tab or newline.
.
Any single character except a newline.
^ and $
The start and end of the text (or of each line with the m flag).
* + ?
Repeat the previous item zero-or-more, one-or-more, or zero-or-one times.
{n,m}
Repeat the previous item between n and m times.
[...]
A character set: matches any one character listed inside.
(...)
A capture group you can read back or reuse.

About the Regex Tester

Regular expressions are compact patterns for finding and extracting text, used everywhere from validation to search-and-replace.

Type a pattern, choose flags such as global or case-insensitive, and paste your text to see every match and capture group update instantly.

This uses the same regular-expression engine as JavaScript, and everything runs in your browser so your text stays private.

Key features

  • Live matches as you type
  • All standard flags: g, i, m, s, u, y
  • Shows capture groups and match positions
  • Clear errors for invalid patterns
  • Ready-to-run email extraction example
  • Downloadable JSON match report

How to use

  1. 1Enter your regular expression and pick any flags.
  2. 2Paste the text to test against.
  3. 3Review the matches, positions and capture groups in the match inspector.
  4. 4Export a structured JSON report when you need to keep the results.

Examples

Find every number
Input: Pattern \b\d+\b against Order 12 items, then 3 more
Output: Matches 12 and 3

Enable flags and inspect capture groups when the pattern uses them.

Frequently asked questions

Which regex flavour does it use?
It uses the JavaScript (ECMAScript) regular-expression engine, so patterns behave exactly as they would in JavaScript code.
What do the flags mean?
g matches globally, i ignores case, m makes ^ and $ match line breaks, s lets the dot match newlines, u enables full Unicode, and y makes matching sticky.
Is my text uploaded anywhere?
No. Matching happens entirely in your browser, so your pattern and text stay on your device.

Open a related tool to prepare your files or refine the finished result.