Regular Expression Tester

Enter a pattern, paste some text, and see every match with its position.

Source text
Result

The regular expression tester is a free tool that runs entirely in your browser, with no data ever sent to a server. Test a pattern against text and see every match.

Reading the result

Every match is listed with its position in the text. Captured groups, the ones you wrap in parentheses in your pattern, appear below, numbered. Named groups are shown with their name.

The most useful flags

The g flag finds every match rather than just the first. The i flag ignores the difference between upper and lower case. The m flag makes the start and end anchors match each line rather than the whole text.

What this tool does not do

This tool follows JavaScript syntax, which differs in places from PCRE, Python or Java. Variable-length lookbehind, for instance, is not written the same way everywhere.

Frequently asked questions

Why does my pattern match nothing?

The most common cause is an unescaped special character. A dot means "any character": to search for a literal dot, write \. with a backslash in front.

Can a greedy pattern freeze the page?

Some badly built expressions cause catastrophic backtracking on long text. If the page freezes, reload it and simplify the pattern, avoiding nested repetitions.

Is my data sent to a server?

No: the text you type or paste is processed entirely in your browser, on your device. It is never transmitted to a server.

Do I need an account or an install?

No: the tool works directly on this page, with no sign-up and no installation.