All tools Regex Tester ● Live Developer Tools

How Regex Tester works

  1. Type or paste your regular expression pattern.
  2. Toggle flags: g (global), i (case-insensitive), m (multiline), s (dotAll).
  3. Paste the text you want to test the pattern against.
  4. Matches are highlighted live in the test string as you type.
  5. Review the match list below for index, full match, and capture group values.
  • Build and debug a regex for validating email addresses or phone numbers.
  • Test a pattern for extracting data (like dates or IDs) from log files.
  • Verify a find-and-replace regex before using it in your code editor.
  • Check whether a regex correctly handles edge cases in sample input.
  • Learn how regex flags and capture groups affect matching behavior.

All matching runs locally in your browser using JavaScript's RegExp engine. Your text is never uploaded.

  • Only JavaScript (ECMAScript) regex syntax is supported, which differs slightly from PCRE, Python, or POSIX regex.
  • Extremely complex patterns on very long input strings may be slow due to backtracking.
  • Does not support testing replacement strings — it tests matching only.

Regex Tester

Regex Tester lets you write a regular expression with configurable flags (g, i, m, s) and test it against a string. Matches are highlighted live in the test string, and a match list shows each match with its index and capture groups. Invalid patterns show a clear error message.

Regex Tester Runs locally

Pattern

//

6 matches

Test string

Highlighted matches

The Quick Brown Fox jumps over the Lazy Dog

Matches

#1Theindex 0
#2Quickindex 4
#3Brownindex 10
#4Foxindex 16
#5Lazyindex 35
#6Dogindex 40
Guide

How to use

  1. Type or paste your regular expression pattern.

  2. Toggle flags: g (global), i (case-insensitive), m (multiline), s (dotAll).

  3. Paste the text you want to test the pattern against.

  4. Matches are highlighted live in the test string as you type.

  5. Review the match list below for index, full match, and capture group values.

Scenarios

Use cases

  • Build and debug a regex for validating email addresses or phone numbers.

  • Test a pattern for extracting data (like dates or IDs) from log files.

  • Verify a find-and-replace regex before using it in your code editor.

  • Check whether a regex correctly handles edge cases in sample input.

  • Learn how regex flags and capture groups affect matching behavior.

Good to know

Limitations & Privacy

Private by design

All matching runs locally in your browser using JavaScript's RegExp engine. Your text is never uploaded.

  • Only JavaScript (ECMAScript) regex syntax is supported, which differs slightly from PCRE, Python, or POSIX regex.

  • Extremely complex patterns on very long input strings may be slow due to backtracking.

  • Does not support testing replacement strings — it tests matching only.

FAQ

Frequently asked questions

What regex flavor is used?

JavaScript (ECMAScript) regex syntax is used, the standard for browsers and Node.js. It supports groups, lookaheads, lookbehinds, character classes, and quantifiers.

Can I test multi-line patterns?

Yes. Enable the 'm' flag to make ^ and $ match at line boundaries instead of only the start/end of the whole string, and the 's' (dotAll) flag to make '.' match newline characters too.

What does the 'g' flag do?

The global flag (g) makes the regex find all matches in the test string instead of stopping after the first one. Without it, only the first match is shown.

How do I see capture group values?

Each match in the match list shows its overall matched text along with the value of each capture group, indexed in the order the groups appear in the pattern.

Why does my regex show an error?

Common causes are unescaped special characters (like an unmatched parenthesis or bracket) or using a flag combination that's invalid in JavaScript. The error message describes what JavaScript's RegExp constructor rejected.

Does it support named capture groups?

Yes. JavaScript's (?<name>...) named capture group syntax is supported, and named groups appear alongside numbered groups in the match details.

Can I use this to test a regex before using it in my code?

Yes — since the tool uses the same JavaScript regex engine as browsers and Node.js, a pattern that works here will behave the same way in your code.