Tools.GamesLoop Logo
TOOLS.GAMESLOOP160+ Free Online Tools

Regex Tester

Test regular expressions live with highlighted matches and groups.

Regex Tester

Developer tool running locally in browser

Advertisement
Ad Space (auto) — Configurable via NEXT_PUBLIC_ADSENSE_CLIENT

What does Regex Tester do?

Write a regular expression and see matches highlighted in your test text as you type. Capture groups are listed per match, replacement output previews live, and a reference panel explains the syntax.

How to Use Regex Tester

  1. 1
    Enter your patternWithout the surrounding slashes.
  2. 2
    Set the flagsGlobal and case-insensitive are the usual choices.
  3. 3
    Paste test textMatches highlight instantly.
  4. 4
    Inspect the groupsEvery capture group is listed per match.

Key Features

  • Live match highlighting as you type
  • All JavaScript flags: global, case-insensitive, multiline, dotall, unicode and sticky
  • Numbered and named capture groups listed per match
  • Replacement preview with $1 and named group references
  • Built-in syntax reference and common pattern library
  • Guards against catastrophic backtracking on pathological patterns

Frequently Asked Questions

Which regex flavour does this use?

JavaScript (ECMAScript). Most syntax is shared with PCRE, Python and Java, but there are differences — JavaScript has no possessive quantifiers or recursion, and lookbehind support arrived relatively recently.

What is a capture group?

Any part of the pattern in parentheses. Its matched text is captured separately and can be referenced as $1, $2 and so on in a replacement. (?<name>…) creates a named group, referenced as $<name>.

Why is my regex extremely slow?

Catastrophic backtracking, usually from nested quantifiers such as (a+)+ against a long non-matching string. The engine explores exponentially many paths. Rewrite to avoid nesting quantifiers over the same characters.

What does the global flag do?

It finds every match rather than stopping at the first. Without it, replace only changes the first occurrence — the single most common regex surprise.