Regex Tester

Test, debug and visualize regular expressions in real time. Supports JavaScript regex syntax with live matching and replace.

Ad Space
/ /
Ad Space
0 matches
Ad Space

What is Regex?

A regular expression (regex) is a sequence of characters that defines a search pattern. Regular expressions are used for pattern matching within strings — to find, replace, or validate text data.

How to Use This Tool

Common Regex Syntax

FAQ

Is my data stored or sent to a server?
No. All regex matching happens in your browser using JavaScript. No data is transmitted anywhere.
Which regex flavor does this tool support?
This tool uses JavaScript's built-in RegExp engine. It supports the g, i, m, s, and u flags.
How do capture groups work?
Wrap part of your pattern in parentheses to create a capture group. Groups are shown in the match details and can be referenced with $1, $2, etc. in the replace field.
Can I use lookahead and lookbehind?
Yes, modern browsers support lookahead (?=...), negative lookahead (?!...), lookbehind (?<=...), and negative lookbehind (?<!...).