Regex Tester

Write a regular expression and see matches highlighted instantly, with capture groups and a replace preview. Uses the JavaScript regex engine.

Quick reference

Safe execution

Some patterns such as (a+)+$ can take exponential time. This tester runs the expression in a background worker and stops it after one second, so your browser tab never freezes.

Note: this tool uses JavaScript syntax. Most patterns also work in Python, Java and C#, but some features differ.

Frequently asked questions

Why do I see only one match?

Enable the g (global) flag to find all matches.

Do I need to escape slashes?

No. Enter the pattern without the surrounding /…/ delimiters.

Does my text leave the browser?

No. Matching runs locally in a Web Worker.