Regex Tester

Test regular expressions in real-time.

Regular Expression
//
Test String
Matches
Advertisement

Test and debug regular expressions against custom test strings with highlighted matches computed client-side in your browser.

How to use it

  1. Enter your regular expression pattern.
  2. Paste the text you want to test it against.
  3. Read the highlighted matches, their index and their capture groups.

Frequently asked questions

Which regex flavour is this?

JavaScript regular expressions, the syntax used by the RegExp object. Most patterns from other languages work, but lookbehind and named groups vary by browser version.

What are capture groups?

The parts of a match wrapped in parentheses. They are listed separately for every match, which is how you pull one field out of a longer string.

Why does my pattern match nothing?

Usually an unescaped special character. Dots, question marks, plus signs, parentheses and square brackets all need a backslash to be matched literally.

Recommended Tools