Monu Tools

Regex Tester

Test a regular expression against your text in real time. See every match highlighted, with capture groups and flags. Runs entirely in your browser.

How to use the Regex Tester

  1. 01

    Type your regular expression in the pattern field.

  2. 02

    Toggle the flags (g, i, m, s, u) you need.

  3. 03

    Enter the test string and see matches highlighted with their groups.

What the regex tester does

The regex tester lets you build and debug regular expressions against your own sample text, with matches highlighted live as you type. It is useful for validating input formats, extracting fields from logs, or testing a pattern before pasting it into code.

Everything runs in your browser, so your patterns and test text are never uploaded.

Which engine it uses

It uses the JavaScript regular-expression engine, the same one in every browser and in Node.js, so a pattern that works here works in your JavaScript and TypeScript code.

Flags and capture groups

Toggle the global, case-insensitive, multiline and other flags to change how a pattern matches. You see every match along with its capture groups, so you can confirm exactly what each part of the pattern is pulling out.

Differences across regex flavors

Other languages such as PCRE, Python and Go share most syntax but differ in some features, so a few advanced constructs may behave differently outside JavaScript. If a pattern works here but not in another language, an engine-specific construct is usually the reason.

Frequently asked questions

Which regex flavour is used?

The JavaScript (ECMAScript) engine built into your browser, so results match what your JavaScript and TypeScript code will do.

What do the flags mean?

g matches all occurrences, i ignores case, m makes ^ and $ match at line breaks, s lets the dot match newlines, and u enables full Unicode handling.

How do I match across multiple lines?

Enable the multiline (m) flag so ^ and $ match at each line break, and add the dotAll (s) flag if you also need the dot to match newline characters.

Are capture groups shown?

Yes. Each match lists its numbered capture groups, and named groups appear by name, so you can see exactly what each part of the pattern captured.

Why does my pattern work here but not in another language?

This uses the JavaScript engine. PCRE, Python and others share most syntax but differ in lookbehind, named groups and some escapes, so port advanced patterns with care.

Is my text uploaded?

No. The pattern and your test text are evaluated entirely in your browser and never leave your device.

Sources

Embed this tool

Add this tool to your own website. Copy the snippet below; it stays up to date automatically.

<iframe src="https://monu.tools/embed/en/regex-tester" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

Learn more

Related tools