0 B UPLOADED · ALL PROCESSING RUNS LOCALLY IN THIS TAB 12 TOOLS ONLINE

Test

Regex Tester

Type a pattern and flags, paste sample text, and see every match highlighted live — with capture groups broken out below.

Pattern
Test string
Matches

      

Walkthrough

How to use it

  1. Type a regular expression into the Pattern field — without the surrounding slashes.
  2. Set flags if needed (g for global, i for case-insensitive, m for multiline). "g" is on by default.
  3. Paste your sample text into the Test string pane.
  4. Matches are highlighted live in the right pane as you type, with a count and each capture group listed below.
  5. If the pattern is invalid, the status line shows the exact JavaScript regex error.

Use cases

When you'd use this

Validating a pattern before shipping it. Test edge cases against a pattern — empty strings, extra whitespace, unexpected characters — before it goes into a form validator or a backend check.

Extracting data from log lines. Write a pattern with capture groups to pull timestamps, IPs, or error codes out of raw log text and confirm the groups line up correctly.

Learning or teaching regex. See immediately how changing a quantifier or anchor changes what matches, which is faster than trial-and-error in application code.

FAQ

Common questions

Which regex flavor does this use?

JavaScript's native RegExp engine — the same one your browser and Node.js use. Patterns behave identically if you're testing something destined for JS code.

Why isn't my pattern matching anything?

Check your flags first: without the "g" flag only the first match is found, and without "i" matching is case-sensitive. Also confirm you haven't accidentally escaped a character that doesn't need it.

Are capture groups shown?

Yes — each match's capture groups are listed underneath the highlighted text, in order.

Is my test data sent anywhere?

No. Matching runs with JavaScript's built-in RegExp in your browser tab; nothing is transmitted or stored.

Related

Related tools