Text Editing & SearchLast updated: 2026-08-27

Regex Tester

Test a regex pattern against any text and instantly see matches highlighted. Supports flags (g/i/m/s/u) and match details.

Open My tools

Matches

ShareXfB!L

How to use

  1. 1

    Enter a pattern

    Type your regex and choose flags (g/i/m/s/u).

  2. 2

    Enter test text

    Type or paste the string you want to match against.

  3. 3

    Check the results

    Matches are highlighted and listed instantly.

Features

  • Real-time matching as you type
  • Supports flag combinations (g/i/m/s/u)
  • Highlights matches and lists all matched strings
  • Your input is never sent to a server

Use cases

Debug patterns

Check whether your regex-in-progress matches correctly against test strings.

Extract and validate data

Test regex used to extract or validate patterns in logs and data.

Compare flags

See the effect of flags like g (all matches) and i (case-insensitive).

Details

Regular expressions (regex) are a notation for describing string patterns - checking email formats, extracting substrings, and so on. They are used heavily in development and data processing.

This tool runs on the browser standard JavaScript RegExp, so no additional libraries are needed. You can combine flags (g=all matches, i=case-insensitive, m=multiline, s=dotall, u=Unicode) for testing.

If the pattern has an error, an error message is shown immediately. A list of matched strings is also displayed, which helps you debug patterns. Nothing you enter is sent to a server.

FAQ

Which regex engine is used?

The browser standard JavaScript RegExp. No additional libraries are required.

Which flags can I use?

You can combine g (all matches), i (case-insensitive), m (multiline), s (dotall), and u (Unicode mode).

Is my regex saved anywhere?

No. Everything is processed in your browser and nothing is stored or transmitted.

What should I do when a pattern error appears?

The regex has a syntax error. Check for unbalanced parentheses or missing escape characters (\).

All processing happens in your browser. Your files are never uploaded.

Optional usage measurement settings

Only with your consent, a random browser ID and tool/learning events are sent to measure return visits. This is pseudonymous measurement. Inputs, answers, keys, files and search terms are excluded. Consent expires after 90 days. Declining does not limit any feature.

Measurement is off.

Retention and privacy