Regex Tester

Test regular expressions against sample text and see matches highlighted, for free.

//g

How to use

  1. 1Enter a regular expression pattern.
  2. 2Choose flags like Global or Case-insensitive.
  3. 3Paste test text and see matches highlighted, with a details table.

Features

  • Live match highlighting
  • Match index and capture groups
  • Standard JavaScript regex flags

Supported formats

JavaScript regular expressions

Privacy

Your pattern and text are matched locally in your browser and are never sent to our server.

About this tool

The Regex Tester runs a JavaScript regular expression against a block of text, highlighting every match inline and listing each one's position and captured groups in a separate table — the fast feedback loop that makes building a pattern by trial and error actually practical, instead of swapping between an editor and a script to check each attempt. It uses the same regex engine that runs in every browser and in Node.js, so a pattern that works here will work in real code. New to regex syntax? Start with our beginner's guide to regular expressions.

Frequently asked questions

What regex flavor does this use?

This tool uses JavaScript's built-in regular expression engine, the same one used in browsers and Node.js.

What do the flags mean?

Global finds every match instead of just the first, Case-insensitive ignores letter case, Multiline changes how ^ and $ behave, and Dot matches newline makes . match line breaks too.

Is my text or pattern sent to a server?

No, matching happens entirely in your browser.

Why doesn't my pattern match anything without the Global flag?

Without Global, JavaScript's regex engine stops after the first match — everything after it in the text is never checked. Turn Global on to find every occurrence instead of just the first.