Skip to content
Back to tools

Regex Tester & Explainer - Test Regular Expressions Online

Test and explain JavaScript regular expressions in real-time. Match highlighting, capture groups, and plain-English explanations.

Test String
Regex Pattern
Enter a pattern to begin.

Write or paste any JavaScript regex, enter test text, and see matches highlighted instantly. The explainer panel breaks down every token — anchors, quantifiers, character classes, groups, lookaheads — in plain English so you understand exactly what the pattern does. Supports g, i, m, s, and u flags. Everything runs in your browser; your data is never sent anywhere.

How to use

  1. 1

    Paste test text

    Paste or type the text you want to search through into the test string area.

  2. 2

    Write a pattern

    Enter your regex pattern without slashes — e.g. (\w+)@(\w+\.\w+). The explainer updates live.

  3. 3

    Select flags

    Toggle g (global), i (case-insensitive), m (multiline), s (dotAll), or u (unicode) as needed.

  4. 4

    Review matches

    Inspect each match, its position, and captured groups in the results panel. Use the explanation to understand what each part of the pattern does.

FAQ

Q.What regex flavor is supported?

This tool uses your browser's native JavaScript RegExp engine (ECMAScript). It supports features like named groups, lookbehind, and the s (dotAll) flag — as long as your browser does.

Q.Does it support lookbehind?

Yes, (?<=...) and (?<!...) are supported in modern browsers (Chrome 62+, Firefox 78+, Safari 16.4+).

Q.Can I use named groups?

Yes. Use (?<name>...) to create a named capture group. Named groups appear in the match detail table.

Q.Why aren't my matches showing?

Check your flags: enable g for all matches (otherwise only the first match is returned), i for case-insensitive matching, and m if you're using ^/$ with multiline text.

Related tools