Live Regex Tester

How to use

Lets you test regular expressions against sample text and see matches highlighted. It is great for validating emails or phone numbers, and for extracting parts of text. Type your pattern in the pattern box and your test text in the other box, pick the flags you need, and watch the matches update live.

Text Utilities PopularLocal only

Live regex matching with capture groups: nothing is sent anywhere.

Common patterns:
//gi
Test String
Matches (0)

No matches found for the current pattern.

When to use this
  • Debugging why a form validation regex rejects a valid input before shipping it
  • Validating a log-parsing pattern against real sample log lines before deploying it
  • Working out the right capture groups for a data extraction script
  • Checking a regex for catastrophic backtracking risk by testing against tricky sample strings

Free and private. Everything runs on your own device, with no account and no uploads.

Debugging a validation pattern for a signup form, or figuring out why a log-parsing regex is not matching, is much faster with instant visual feedback than trial-and-error in code. This live regex tester lets you type a pattern and flags on one side and sample text on the other, highlighting every match, capture group and index in real time so developers can iterate quickly before shipping the pattern into their application.

It uses your browser's native JavaScript RegExp engine, so behavior matches exactly what you would get running the same pattern in JavaScript code.

Yes, matched capture groups are displayed alongside the full match so you can verify a pattern before using it in code.

Yes, JavaScript-supported named groups using the (?<name>...) syntax work and their names are shown with the match.

Not always, some syntax differs between regex flavors, so a pattern written for Python's re module or PCRE may need small adjustments to work identically in JavaScript.

How it works
  1. 1

    Enter your regex pattern

    Type the pattern into the pattern field, without the surrounding slashes.

  2. 2

    Set flags

    Toggle flags like g, i, m or s depending on the matching behavior you need.

  3. 3

    Paste sample text

    Add the text you want to test the pattern against.

  4. 4

    Review highlighted matches

    Matches are highlighted live, with capture groups shown separately.

  5. 5

    Refine the pattern

    Adjust the regex until it matches exactly what you expect, with no false positives.

Pro tips
  • ·Test against edge-case inputs, not just the happy path, the highlighted matches make false positives easy to spot.
  • ·Remember this uses JavaScript's RegExp engine, so patterns copied from Python or PCRE may need small syntax tweaks.
  • ·Named capture groups with (?<name>...) are supported and shown by name, which is worth using for anything you will read back later in code.