Regex Tester & Debugger

Test and debug regular expressions online with live match highlighting, capture groups, and flags. Free and client-side.

// regex/gi○ ready
//gi
Test string

Matches · 0

Enter a pattern to begin.

Cheatsheet · click to insert

About this regex tester

Regular expressions are a compact language for finding and extracting patterns in text. This tester highlights every match live as you type, breaks out numbered and named capture groups, and reports errors in your pattern immediately — so you can build and debug a regex without leaving the page.

It uses your browser's JavaScript regex engine, so the results match what you will get in real JavaScript code. The clickable cheatsheet inserts common tokens to speed things up.

How to use it

  1. Type your pattern in the slashes at the top.
  2. Toggle flags like g (global) and i (ignore case).
  3. Paste your test text — matches highlight instantly.
  4. Review each match and its capture groups below.

Frequently asked questions

Which regex flavour does this use?
It uses the JavaScript (ECMAScript) regular expression engine built into your browser, so patterns behave exactly as they would in JavaScript code.
What do the flags mean?
g matches all occurrences, i ignores case, m makes ^ and $ match each line, s lets the dot match newlines, u enables full Unicode, and y anchors matching to the current position (sticky).
Can I see capture groups?
Yes. Every match lists its numbered capture groups ($1, $2, …) and any named groups, so you can confirm exactly what each part of your pattern captured.
Is anything sent to a server?
No. Your pattern and test text stay in your browser — matching runs entirely client-side.

// More tools