freemium.tools
developer

Regex Tester

Test regular expressions with live highlighting, groups and replace.

Runs entirely in your browser — nothing is uploaded.

Your result appears here.

About the Regex Tester

The Freemium.Tools regex tester matches a regular expression against your text live, highlighting every match, capture group and replacement result in the browser.

Regular expressions are quick to write and hard to trust. Seeing each match highlighted in real text, with the capture groups listed, turns guesswork into something you can confirm before shipping it.

Flags for global, case-insensitive, multiline and dot-matches-newline behaviour can be toggled individually, and a replacement field lets you preview a search-and-replace with $1 group references.

How to use it

  1. 1Enter a pattern. Type your expression or start from a ready-made preset.
  2. 2Paste the test text. Matches highlight as you type.
  3. 3Check groups and replace. Review captures and preview a replacement.

Frequently asked questions

Which regex flavour does this use?

JavaScript (ECMAScript) regular expressions, the same engine your browser and Node.js use. Most patterns are portable, though lookbehind and named groups differ between languages.

What does the g flag do?

It keeps searching after the first hit so every match in the text is found, rather than stopping at the first one.

How do I use capture groups in a replacement?

Reference them as $1, $2 and so on in the replacement field; $& inserts the whole match.

Why does my pattern hang or feel slow?

Nested quantifiers such as (a+)+ can backtrack catastrophically. Simplify the pattern or anchor it so the engine fails fast.

Is my text uploaded?

No. Matching runs entirely in your browser.

Related tools