Skip to content

Developer tool

Regular Expression Tester

Test JavaScript regex live with highlighted matches and capture groups.

Runs in your browser. Nothing is uploaded.

//gi
Highlighted · 0 matches

About the Regex Tester

Regular expressions are powerful and famously hard to get right the first time. Type a pattern, paste some sample text, and see every match highlighted instantly, along with its position and capture groups.

This tester uses your browser's JavaScript regex engine, so what you see is exactly what you'll get in JavaScript and Node.js code. Toggle the global, ignore-case, multiline, dotAll and unicode flags to see how they change the result.

How to use it

  1. Enter your pattern between the slashes.
  2. Toggle the flags you need.
  3. Paste test text and watch matches highlight.
  4. Check the table for index and capture groups.

Frequently asked questions

Which regex flavour is this?

JavaScript (ECMAScript). Most syntax is shared with other languages, but features like lookbehind and named groups can differ between engines.

What do the flags mean?

g finds all matches, i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines, and u enables full Unicode matching.

Why does my pattern freeze the page?

Nested quantifiers can cause catastrophic backtracking. Simplify the pattern or anchor it more tightly.

<let's talk/>

Want this built into your own software?

We build custom tools, calculators and automation around your business process. Tell us what you need.