Regex Tester - Test Regular Expressions With Live Matches

Writing a regular expression usually means running it, reading the error, adjusting a bracket, and repeating. This tester shortens that loop: type your pattern and your sample text, and matches highlight live with capture groups listed underneath. Switch flags like global, case-insensitive and multiline without leaving the page.

Your patterns and sample data stay in the browser, which is useful when the text contains emails, tokens or customer records you should not paste into a public service.

Last updated: 27 November 2026.

Common regex building blocks

PatternMatchesExample
\d+One or more digitsInvoice numbers, quantities
\w+@\w+\.\w+Simple email shapeQuick email validation
^\s+Leading whitespaceCleaning pasted text
.*Anything on a lineExtracting a field

How to test a regular expression

  1. Open the Regex Tester and type your pattern into the expression box.
  2. Paste sample text into the test area below.
  3. Watch matches highlight and capture groups appear as you edit.
  4. Toggle flags such as global or case-insensitive, then copy the working pattern into your code.

Why live feedback beats trial and error

Regex tester FAQ - flags, capture groups, errors

Which flags does the tester support?

Global (g), case-insensitive (i), multiline (m) and dot-all (s) can be toggled to match how your runtime will use the pattern.

Why does my pattern show an error?

Unclosed brackets, stray backslashes and invalid quantifiers are the usual causes; the tester points at the position so you can fix it.

Can I test capture groups?

Yes. Each group's matched text is listed below the input, so you can verify extraction before shipping code.

Does it support lookbehind and named groups?

Modern browsers do, and the tester passes them through to the browser's own regex engine.

Is my text stored or sent anywhere?

No. Pattern and sample text are evaluated locally in the page.

Do I need an account?

No signup - open the page and start testing immediately.

Related Text & Dev