Regex tester

Type a pattern and some text, see every match as you type.

This tool needs JavaScript. Please turn it on in your browser.

How to use it

  1. Step 1

    Type the pattern without the slashes.

  2. Step 2

    Set the flags, for example g for all matches or i to ignore case.

  3. Step 3

    Paste your test text and read the list of matches and groups.

About this tool

This tester uses the regular expression engine of your browser, which is the JavaScript flavour. Other languages such as .NET, Python or PCRE differ in some details, such as named groups and lookbehind support.

Matches are listed with their position and capture groups. Everything stays in your browser.

Questions

Which regex flavour is it?

JavaScript (ECMAScript). Basic patterns work the same in .NET and Python, but check advanced features in your own language.

What do the flags mean?

g all matches, i ignore case, m ^ and $ match on each line, s dot matches new lines, u Unicode, y sticky.

Why is the page slow?

Some patterns take very long on long text (catastrophic backtracking). Simplify the pattern or reload the page.

Is my text sent anywhere?

No. It is tested in your browser.

WhatsApp