Skip to content
SupraIQ

Regex Tester

Test JavaScript regular expressions and inspect matches and groups.

Runs entirely in your browser using JavaScript regular expressions. Your text is never uploaded. The share link contains the pattern and flags, and your text only if it is 300 characters or fewer.

Pattern

JavaScript (ECMAScript) syntax. Results update as you type.

g

Test text

2 matches found

Matches are shaded. Capture groups get their own colour and an underline, so colour is never the only cue.

  1. Match 1index 8length 15

    ada@example.com

    1 userada2 domainexample.com
  2. Match 2index 27length 21

    grace.hopper@navy.mil

    1 usergrace.hopper2 domainnavy.mil

About this tool

Test a JavaScript regular expression against sample text with live highlighting. See every match, its position and capture groups, get a plain-English explanation of the pattern, try replacements, and start from a library of common patterns.

How to use it

  1. Enter a pattern and toggle the flags.
  2. Enter the text to test; matches highlight as you type.
  3. Review the match list and the explanation, or use the Replace tab.
  4. Copy the share link to send the pattern to someone.

Frequently asked questions

Why does it only test part of my text?
Some patterns, such as nested quantifiers, can freeze a browser tab. For those, only the first few characters are tested until you choose to run it on the full text.
Which regex flavour is used?
The JavaScript (ECMAScript) engine of your browser. Other languages may behave differently for some features.

You may also find these useful