Write a JavaScript regular expression and see what it matches as you type. Features include:

  • Matches highlighted in your text, with every capture group and named group listed
  • A plain-English explanation of the pattern, token by token
  • Test cases marked “should match” or “should not match”, each shown passing or failing
  • Share the whole test as a link: it lives after the #, so it never reaches a server
  • Patterns that backtrack catastrophically are stopped after a second instead of freezing the page, which warns you before they reach production

It tests JavaScript’s regular expressions, using your browser’s own engine. Other flavours, such as PCRE or Python’s, differ in places.

~/tools/regex-tester
Flags

Matches

    Explanation

      Test cases