RGX

Regex Tester

Test regular expressions live with match highlighting.

regex-tester.tool
0 matches
//g
Matches will be highlighted here
Nothing you type here is ever sent to a server - matching happens locally in your browser.
Overview

What is a regex tester?

This tool tests a regular expression against sample text live, highlighting every match directly in the text and listing each match with its capture groups. It supports standard flags (global, case-insensitive, multiline, dot-all, unicode) and named capture groups.

Quick start

How to use this tool

  1. 1Type a pattern (without the surrounding slashes) into the Pattern field.
  2. 2Toggle the flags you need - g, i, m, s, u.
  3. 3Paste your test text - matches are highlighted live as you type.
  4. 4Scroll the match list below to see each match's captured groups and position.
Where it helps

Common use cases

Testing a validation pattern (email, phone number, URL) against real examples before using it in code
Debugging why a regex isn't matching text the way you expect
Extracting structured data from text using capture groups
Learning regex by experimenting with live feedback instead of trial-and-error in code
Good to know

Frequently asked questions

Why is the 'g' flag always effectively on?

To find and highlight every match in the text (not just the first), the tool internally searches globally regardless of whether you've toggled g - but the flag list shown next to your pattern reflects exactly what you've selected.

Does it support named capture groups?

Yes - groups written as (?<name>...) are shown by name alongside numbered groups in each match's details.

What happens if my pattern is invalid?

You'll see the exact JavaScript regex error (like an unterminated character class) instead of a silent failure or crash.

Is my text sent anywhere?

No - matching happens entirely in your browser using JavaScript's native regex engine.

quick_facts.json

{

"runs_in_browser": true,

"data_sent_to_server": false,

"signup_required": false,

"price": "free",

"category": "tools"

}

Related tools

123
No signup
Word Counter

Count words, characters, and reading time instantly.

Open tool
Aa
No signup
Case Converter

Switch between camelCase, snake_case, kebab-case, and more.

Open tool