Regex Tester

Test and debug regular expressions in real time. Highlights matches, capture groups, and supports JavaScript regex flags for instant pattern validation.

Used 11.7K times today

//g

How to Use Regex Tester

  1. 1

    Enter your regular expression

    Type your regex pattern in the expression field, including any flags (g, i, m, s, u).

  2. 2

    Paste your test string

    Enter the text you want to match against in the test string area.

  3. 3

    Review matches and groups

    All matches are highlighted in real time, and capture groups are listed with their index and matched values.

Frequently Asked Questions

Which regex flavour does this tester use?
This tester uses JavaScript's built-in RegExp engine, which is compatible with ECMAScript regex syntax. It supports flags g (global), i (case-insensitive), m (multiline), s (dotAll), and u (unicode).
How do I test named capture groups?
Use the syntax (?<name>pattern) in your regex. Named groups are displayed alongside indexed groups in the match results panel.
Why does my regex cause freezing?
Catastrophic backtracking occurs when certain regex patterns with nested quantifiers take exponential time on certain inputs. If the tester seems slow, simplify your pattern to avoid ambiguous repetition.

About Regex Tester

The Regex Tester is a real-time regular expression debugger that highlights matches and capture groups as you type. Regular expressions are one of the most powerful yet complex tools in a developer's toolkit, and having an instant visual feedback loop dramatically speeds up writing and debugging patterns for input validation, log parsing, text extraction, and string manipulation.

The tester supports all modern JavaScript regex features including named capture groups, lookaheads, lookbehinds, and Unicode property escapes. Match results, group details, and match count are shown in real time, making it easy to iterate on your pattern until it behaves exactly as intended.

More Developer Tools Tools