Regex Tester

Your text never leaves your browser — everything runs on your device.



Test a regular expression against your text and see the results live as you type: matches are highlighted in the text, and every match is listed with its position and capture groups. Start from a preset — email, URL, phone number, date, hex colour or IPv4 — or write your own pattern with flags such as g (global), i (case-insensitive) and m (multiline). Invalid patterns are explained instead of failing silently. Free, no signup, and your text never leaves your browser.

Frequently asked questions

What are capture groups?

Parentheses in a pattern capture part of the match — for example (\w+)@(\w+) captures the username and domain of an email separately. The match list shows each group next to its match.

What do the g, i and m flags do?

The g flag finds every match instead of only the first. The i flag makes matching case-insensitive. The m flag makes ^ and $ match the start and end of each line instead of the whole text.

Why does my pattern say "invalid"?

The pattern has a syntax error — an unclosed bracket or parenthesis is the usual cause. The error message names the problem; fix it and the tester updates live.

Is this the same regex as in JavaScript?

Yes. Patterns are tested with the JavaScript RegExp engine, so the results match what the same pattern would do in JavaScript code. Other languages differ in small details.