RegEx Tester

Enter a regular expression and a test string to see matches highlighted live, along with capture groups and match positions.

Highlighted matches

Matches found: 0

Your files are processed locally in your browser. They are not uploaded to our servers.

How to use

  1. Enter your regular expression pattern.
  2. Toggle flags like global, ignore case, multiline or dot-matches-newline as needed.
  3. Paste your test string and see matches highlighted, with details for each one below.

What is this tool?

RegEx Tester lets you write and test JavaScript regular expressions against any string, with matches highlighted directly in the text and a breakdown of each match's position and captured groups. Invalid patterns show a clear error instead of failing silently.

Common uses

  • Debugging a regular expression that isn't matching as expected
  • Testing a validation pattern (email, phone number, etc.) against sample inputs
  • Learning regex syntax by experimenting with flags and patterns
  • Extracting structured data from text using capture groups

Related tools

FAQ

What regex flavor does this use?

This uses JavaScript's native RegExp engine, the same one used in browsers and Node.js — syntax may differ slightly from other languages like Python or PCRE.

Why do I need the global flag?

Without the global (g) flag, only the first match in the string is found. Enable it to find and highlight every match.

Is my test string sent anywhere?

No. Matching happens entirely in your browser using JavaScript's built-in regex engine — nothing is uploaded.