Which regex flavor does this tool use?
This tool uses your browser's native JavaScript RegExp engine — the exact same engine that runs String.match(), String.replace(), and RegExp.test() in Node.js and every browser. Patterns you test here will behave identically in JS code, but may differ slightly from PCRE (PHP, Python's re module has its own dialect too), POSIX, or .NET regex — for example, JavaScript lacks recursive patterns and possessive quantifiers that some other engines support.
What do the g, i, m, s, u flags do?
g (global) finds every match instead of stopping at the first. i (ignore case) makes matching case-insensitive. m (multiline) makes ^ and $ match at line boundaries within the string, not just the very start/end. s (dotAll) makes . match newline characters too, which it normally does not. u (unicode) treats the pattern as a sequence of Unicode code points, enabling correct handling of characters outside the Basic Multilingual Plane and Unicode property escapes like \p{Emoji}.
Why is my pattern not matching anything?
Common causes: forgetting to escape special characters (., *, +, ?, (, ), [, ], {, }, ^, $, |, \ all need a backslash to match literally); missing the g flag when you expect multiple matches; using ^ or $ without the m flag when your test string has multiple lines; or a typo in a character class like [a-z] vs [a-Z] (invalid range). The live highlighting above updates as you type, so you can narrow down which part of the pattern is the problem by simplifying it piece by piece.
What is the difference between numbered and named capture groups?
A numbered group — (\w+) — is captured positionally: group 1, group 2, and so on, accessed as match[1], match[2] in JavaScript. A named group — (?<user>\w+) — is captured under a label you choose, accessed as match.groups.user. Named groups make patterns with several captures far more readable, especially when reordering or adding groups later, since positional indices don't shift.
How does the replace preview work?
It runs testString.replace(regex, replacement) exactly as JavaScript would. Use $1, $2, etc. in the replacement to reference numbered capture groups, or $<name> for a named group. Without the g flag, only the first match is replaced — this mirrors real JavaScript replace() behavior exactly, so what you see here is what your code will actually do.
Is my test data private?
Yes — matching runs entirely in your browser via the native RegExp engine. The pattern and test string you enter are never transmitted anywhere, which matters if you're testing a regex against real emails, log lines, or other sensitive sample data.