Regex Tester

Test and debug regular expressions with live matching.

//g
Enter text to see matches
No matches found

About Regex Tester

Test and debug regular expressions in real-time. See highlighted matches, capture groups, and match positions. Supports all JavaScript regex flags.

What Is This Tool?

Our regex tester lets you write and test regular expressions against any input text in real time. Matches are highlighted as you type your pattern, and capture groups are displayed separately. It supports JavaScript regex syntax including flags like global (g), case-insensitive (i), multiline (m), and more.

How to Use

  1. Enter your regular expression in the Pattern field.
  2. Optionally set flags (g for global, i for case-insensitive, m for multiline).
  3. Enter the test string in the Test Input field.
  4. Matches are highlighted in real time, and capture groups appear in the results panel.

Common Use Cases

Tips & Tricks

Frequently Asked Questions

Why doesn't my pattern match more than one occurrence?

Without the global (g) flag, JavaScript regex stops after the first match. Add the g flag to highlight and count every occurrence in the test string.

What's the difference between the case-insensitive and multiline flags?

The i flag makes letter matching ignore case (A matches a). The m flag changes ^ and $ to match the start/end of each line rather than only the start/end of the whole string.

How do I see what a capture group matched?

Wrap the part of your pattern you want to extract in parentheses, e.g. (\d+). The results panel lists each capture group's matched value separately from the full match.

Does this tool support lookaheads and lookbehinds?

Yes, since it runs on the JavaScript regex engine, which supports lookaheads (?=...), negative lookaheads (?!...), and lookbehinds (?<=...) in modern browsers.

Is my test text or pattern sent anywhere?

No. Matching happens entirely client-side using JavaScript's built-in RegExp engine — nothing is transmitted to a server.

Test and debug regular expressions with real-time matching. Highlight matches, view capture groups, and test against multiple strings with our free regex tester.

regex tester · regular expression tester · regex validator · regex debugger · regex online · pattern matching · regex checker · regex builder · regex playground