Skip to content
snip tools

Regex tester

Test regular expressions with live highlighting, flags and capture groups. Runs in your browser.

Runs 100% in your browser
/ /
Matches

How to test a regular expression

  1. Enter a pattern. Type your regex and toggle the flags you need.
  2. Add test text. Paste the string to match against; matches highlight live.
  3. Inspect matches. Review the match list and capture groups below.

About regular expressions

Regular expressions are a compact language for matching patterns in text — validating emails, extracting fields from logs, find-and-replace across a codebase. They're famously fiddly, so a live tester that highlights matches and breaks out capture groups as you type saves a lot of trial and error. This uses your browser's own JavaScript regex engine, so what works here works in your JS code.

Frequently asked questions

What regex flavor does it use?
JavaScript (ECMAScript) regular expressions — the same engine as Node and browsers. Most PCRE patterns work, but some constructs (e.g. recursion, certain lookbehinds in old browsers) differ.
Which flags can I set?
g (global), i (ignore case), m (multiline), s (dotAll), u (unicode) and y (sticky). Toggle them next to the pattern.
Does it show capture groups?
Yes — each match lists its numbered and named capture groups, and matches are highlighted in the test string.
Is my pattern or text uploaded?
No — matching runs entirely in your browser.