Regex Tester

Test and debug your regular expressions in real time. See matches highlighted instantly, inspect capture groups, and preview replacements — all in your browser.

//

Quick Reference

.Any character
\dDigit [0-9]
\wWord char [a-zA-Z0-9_]
\sWhitespace
^Start of string
$End of string
*0 or more
+1 or more
?0 or 1
{n,m}n to m times
[abc]Character class
(group)Capture group
(?:x)Non-capturing group
(?<name>x)Named group
x|yAlternation
\bWord boundary

Frequently Asked Questions

What is a regular expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. It is used for pattern matching within strings — finding, validating, extracting, and replacing text. Regex is supported in virtually all programming languages including JavaScript, Python, Java, and Go.

What do the flags mean?

g (global) finds all matches instead of stopping at the first. i makes the match case-insensitive. m (multiline) lets ^ and $ match line boundaries instead of the full string. s (dotall) lets the dot (.) match newlines. u enables full Unicode matching.

How do capture groups work?

Parentheses (...) create capture groups that extract parts of a match. You can reference them in replacements as $1, $2, etc. Named groups use the syntax (?<name>...) and can be referenced as $<name>. Non-capturing groups (?:...) group without capturing.

Is my data processed on a server?

No. All regex testing runs entirely in your browser using JavaScript's built-in RegExp engine. Your data never leaves your device.