Regex Tester

Loading tool…

About Regex Tester

Enter a Pattern, Flags, and a Test string. Matches highlight as you type. The table lists index, the full match, and groups (numbered and named). Status is Running, then N matches, or a timeout message.

The flavor is the browser's ECMAScript RegExp. There is no replace, no file drop, and no copy of the match list. Paste file contents into the test box if you need to search a file.

How to use Regex Tester

  1. 1Enter the pattern and flags. JavaScript flags: g, i, m, s, u, y, v, d. u and v are exclusive.
  2. 2Paste the test string. Matches highlight as you type. There is no file upload.
  3. 3Inspect groups. Each match lists numbered groups and named groups when they exist.
  4. 4Simplify if it times out. Regex timed out means the pattern was still running at 800ms. Reduce nested quantifiers.

Flags and timeout

Flag buttons: g (global), i (ignore case), m (multiline), s (dotAll), u (unicode), y (sticky), v (unicode sets), d (has indices). u and v cannot both be on. Matching always searches globally: g is added even if you leave it off, so toggling g does not change find-all behavior. d is accepted; match indices from that flag are not shown in the table.

The worker stops after 800ms. Nested quantifiers that explode on near-matches hit that limit. You also stop after 5,000 matches. Lookbehind and unicode sets work only if this browser's RegExp supports them.

Limits and privacy

The pattern and test string stay in your browser. Nothing is uploaded. No account. A stuck pattern is killed after 800ms so the page stays usable.

FAQs

Which regex flavor is this?
JavaScript (ECMAScript), the same RegExp as this browser. Not PCRE or Python.
Why does turning off g still find all matches?
The tester always adds g so highlights cover the whole string. The g button does not switch to first-match-only.
What is catastrophic backtracking?
Nested quantifiers that explode on near-matches. We abort after 800ms instead of freezing the page.
Is lookbehind supported?
If this browser supports it (current Chrome, Firefox, and Safari do). We do not polyfill it.
Can I test against a file?
Paste the file contents into Test string. There is no drop zone on this page.