Test and debug regular expressions with live matching, capture groups, and replace mode.
Regex Tester lets you build and debug regular expressions against your own sample text and see every match highlighted the moment you type. Enter a pattern such as \b\d{3}-\d{2}-\d{4}\b or [a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}, toggle flags like g (global), i (case-insensitive), m (multiline), s (dotall), and u (unicode), and the tool marks each hit, lists capture groups, and reports how many matches were found.
It runs entirely in your browser using the native JavaScript RegExp engine, so it is the right fit for developers writing JavaScript, TypeScript, or Node.js patterns, as well as anyone validating email addresses, phone numbers, log lines, URLs, or CSV fields who wants instant feedback without deploying code.
The tool compiles your pattern and selected flags into a native JavaScript RegExp object and executes it against your input. When the global (g) flag is set, it iterates with RegExp.exec or matchAll to collect every match plus its index; without g it returns only the first match. Each result exposes the full match at group 0 and any parenthesized capture groups at group 1, 2, and so on, including named groups written as (?<year>\d{4}).
Because it uses the ECMAScript regex dialect, syntax follows JavaScript rules: \d \w \s for digit, word, and whitespace classes, quantifiers like * + ? {2,5}, anchors ^ $ \b, alternation with |, lookahead (?=...) and (?!...), and lookbehind (?<=...) and (?<!...). Keep in mind this differs from PCRE, Python re, or Go regexp in places, so features such as possessive quantifiers or atomic groups are not available. A malformed pattern, like an unclosed group or an invalid quantifier, surfaces the engine's SyntaxError message so you can fix it immediately.
It uses the JavaScript (ECMAScript) RegExp engine that runs in your browser. Patterns behave exactly as they would in JavaScript, TypeScript, and Node.js, which can differ slightly from PCRE, Python, Java, or Go dialects.
g finds all matches instead of stopping at the first, i ignores letter case, m makes ^ and $ match at line breaks, s (dotall) lets the dot match newline characters, and u enables full unicode and \p{...} property escapes.
Wrap the portion you want in parentheses to create a capture group, for example (\d{4})-(\d{2})-(\d{2}). The results panel lists each group by number, and you can name them with (?<name>...) for named groups.
This tester follows JavaScript regex rules. Constructs like inline modifiers (?i), possessive quantifiers, or certain unicode shortcuts that work in Python re or PCRE may not be supported, and lookbehind support depends on your browser version.
Yes, it is completely free with no sign-up. All matching happens locally in your browser using the built-in JavaScript engine, so your patterns and test text are never uploaded to a server.
No. The sample text is treated as literal data to search. Only the pattern field interprets regex syntax, so escaping applies there, for example \. to match a literal dot.
The tool shows the JavaScript engine's error message, such as an unterminated group or invalid quantifier, and highlights that the pattern could not compile so you can correct the syntax before matching.