Regex Tester

Test regular expressions with live match highlighting, capture groups and common flags. Runs in your browser, nothing uploaded.

Test regular expressions online with live match highlighting, capture groups and flags (g, i, m, s). Paste your pattern and text, and matches light up as you type — the fastest way to debug a regex without running code.

How to test a regular expression

Enter a JavaScript regular expression in Pattern and paste sample text into Test text. Matches are highlighted as you type, while the results list shows match positions and capture groups.

Enable g for all matches, i for case-insensitive matching, m for multiline input, s for dot-all matching, or u for Unicode behavior. The tester uses the ECMAScript regex engine found in modern browsers.

Engine: ECMAScript (JavaScript) regular expressions — the same engine browsers and Node.js use.

Highlighted text

Example

Pattern \b\d{4}-\d{2}-\d{2}\b with flag g, on this text:

Deployed 2026-10-14, rolled back 2026-10-15.
Ticket 12026-10-140 is not a date.

gives 2 matches: 2026-10-14 and 2026-10-15. Without the \b word boundaries you get a third, false match inside 12026-10-140. Walk-through in the regex guide.

How to use the Regex Tester & Matcher

  1. Type your regex pattern and choose flags.
  2. Paste or type the test text.
  3. Matches, groups and positions appear live as you type.

Frequently asked questions

How do I test a regex online?

Enter your pattern and test string above; matches are highlighted live with zero setup.

What regex flavor does it use?

The JavaScript regex engine (ECMAScript), the same engine used by browsers and Node.js.

What do the flags g, i, m, s mean?

g = global, i = case-insensitive, m = multiline, s = dot matches newlines.

Can I see capture groups?

Yes — each match expands to show its numbered capture groups.

Fun facts about Regex Tester