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 and listing each match's position and captured groups. It is useful for building and debugging regular expressions before using them in code.

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.