RegEx Tester
Test and debug regular expressions with real-time highlighting
Why Use This Tool?
- Test regular expressions in real time with instant match highlighting on your test string.
- View captured groups and match details for every pattern match.
- Supports all JavaScript regex flags (g, i, m, s, u) with live flag toggling.
How to Use
- Enter your regular expression pattern
- Toggle flags (g, i, m, s, u) as needed
- Type or paste your test string
- Matches are highlighted in real time with captured groups shown below
FAQ
What regex flags are supported?
All standard JavaScript regex flags are supported: g (global), i (case-insensitive), m (multiline), s (dotAll), and u (unicode).
How do I see captured groups?
Captured groups from parentheses in your pattern are displayed in the matches panel below the test string. Each match shows its full match and individual groups.
Does this work offline?
Yes. All regex testing runs in your browser using JavaScript's native RegExp engine. No data is sent to any server.
Will this regex work in other programming languages?
This tool uses JavaScript regex syntax. Most basic patterns work across languages, but advanced features like lookbehind, named groups, and flag support may differ in Python, Java, or other languages.
What is the difference between .* and .*? in regex?
.* is greedy and matches as much as possible. .*? is lazy and matches as little as possible. For example, in "<b>a</b><b>b</b>", <.*> matches the entire string while <.*?> matches just "<b>".