toolgix

Regex Tester

Test JavaScript regular expressions with live highlighting, groups and replace.

Runs in your browserFree · no sign-up
01 Enter values

g global · i ignore case · m multiline · s dotAll · u unicode · y sticky · v sets

02 Matches

How to use Regex Tester

  1. Type a pattern and flags (without slashes).
  2. Edit the test string; matches highlight as you type and groups are listed below.
  3. Optionally enter a replacement to preview the result of String.replace.

How it works

Patterns run on your browser’s own JavaScript regex engine, so results are exactly what your JavaScript or TypeScript code will produce, including named groups ((?<name>…)), lookbehind and Unicode property escapes (\p{L}).

Matching runs in a background worker with a time limit. A pattern with catastrophic backtracking (such as (a+)+$ on a long string) is stopped after 1.5 seconds instead of freezing the page, with an explanation.

Frequently asked questions

Is this the same as PCRE or Python regex?

Mostly, but not entirely. Possessive quantifiers and some PCRE syntax do not exist in JavaScript, and named groups use (?<name>…) like Python’s newer syntax. Test with the engine you will deploy to.

Why do I only get one match?

Add the g (global) flag to find all matches.

What is catastrophic backtracking?

Nested quantifiers can make the engine try exponentially many combinations. Rewrite the pattern to remove ambiguity, for example (a+)+ → a+.

Is my test text sent anywhere?

No. Everything runs in your browser.

Limitations

  • Shows at most 1,000 matches.
  • Only the JavaScript regex flavour is supported.

Last reviewed November 9, 2026. How we build and test tools.

Categories

Recent and favourites

Tools you open appear here, and tools you star with “Favourite” stay at the top. This list is kept only in this browser.

Browse all 78 tools

↑ ↓ to moveEnter to openEsc to close