Regex Tester Online

Test regular expressions in real time, highlight matches, and view capture groups.

//g
Flags:global ·
TEST STRING0 chars

What Is Regex Tester?

Regex Tester is a free online tool that lets you write and test regular expressions in real time against any test string. It highlights every match directly in the text, lists all matches with their index positions, and displays named capture groups — making it the fastest way to debug and validate regex patterns without leaving your browser.

How to Use Regex Tester

  1. Type your regular expression pattern into the pattern field.
  2. Toggle flags (g, i, m, s, u) as needed.
  3. Paste or type your test string — matches are highlighted instantly.
  4. Review the match list below for index positions and capture groups.
  5. Click Copy Matches to copy all matched strings to clipboard.

Features

  • Real-time regex matching as you type
  • Inline match highlighting in the test string
  • Match list with index positions and named capture groups
  • Toggle g, i, m, s, u flags individually
  • Clear error messages for invalid patterns
  • Copy all matches to clipboard

FAQ

What regex flavour does this tool use?

The Regex Tester uses JavaScript's built-in RegExp engine, which supports standard regex syntax including lookaheads, named capture groups, and Unicode mode.

What do the flags mean?

g = global (find all matches), i = case-insensitive, m = multiline (^ and $ match line boundaries), s = dotAll (. matches newlines), u = Unicode mode.

Is my text sent to a server?

No. All regex matching runs entirely in your browser using the JavaScript RegExp engine. Nothing is uploaded.