Skip to content
QZTools

Regular expression tester

Type a pattern and instantly see which parts of the text match.

Everything runs in your browser. Nothing you type or paste is sent to a server.

How to use the regular expression tester

  1. 1

    Type your regular expression.

  2. 2

    Turn on the flags you need (g, i, m, s, u).

  3. 3

    Paste the test text and review matches and groups.

About this tool

It uses your browser's JavaScript regex engine, the same as Node.js and your web apps, including named groups and lookbehind.

Patterns run in a separate worker with a time limit, so a catastrophically backtracking pattern can't freeze the page.

Frequently asked questions

Does it work for PHP or Python?

Most patterns behave the same, but engines differ in syntax. This tool uses JavaScript syntax.

What is a named group?

A group like (?<year>\d{4}) that you can reuse by name in the replacement with $<year>.