devtools

Regex Tester

Test JavaScript regular expressions live — see matches, groups and indices.

client-sidefreeno-signup
//gim
Contact alice@example.com or bob@mail.org for details. Invalid: not@an@email
#1alice@example.com@8
groups: [0] alice [1] example.com
#2bob@mail.org@29
groups: [0] bob [1] mail.org
tested locally in your browser · nothing is uploaded
// how to use

How to use the Regex Tester

Test a JavaScript regular expression against any text and see every match highlighted with its position and capture groups. Toggle the standard flags with a click, and get instant, precise feedback when a pattern is invalid.

  1. 01Enter your pattern between the slashes, then toggle any flags (g, i, m, s, u, y).
  2. 02Type the text to test against in the test string panel.
  3. 03Read the highlighted matches and the details list showing each match’s index and capture groups.

tips

  • Use g to find all matches instead of just the first, and i for case-insensitive matching.
  • The s (dotAll) flag makes . match newlines; u enables full Unicode and named groups.
  • This tester uses the JavaScript engine — patterns that work in PCRE or Python may behave slightly differently here.

frequently asked

What regex flavor does this support?+

This tool uses your browser’s native JavaScript RegExp engine. It supports all standard flags (g, i, m, s, u, y) including named capture groups and the unicode property escapes (ダ-9) introduced in modern engines.

What do the flags mean?+

g = global (find all matches, not just the first), i = case-insensitive, m = multiline (^ and $ match line breaks), s = dotAll (. matches newlines), u = unicode mode, y = sticky (match at lastIndex). Click a flag to toggle it.

Why does my regex match in another tool but not here?+

Different languages use different regex engines. PCRE (PHP, R), RE2 (Go), and Python’s re have slightly different syntax and features. This tester matches the JavaScript engine, which is what runs in browsers and Node.js.

Is this tool free?+

Yes. Every match is computed in your browser — nothing is uploaded.