Developer tools

Regular expression tester

Test regular expressions against sample text with real-time highlighting. Shows matches, capture groups and a replace preview.

  • Free, no sign-up
  • No data stored
  • Reviewed 2026-01-15

Your details

Results

About the Regex Tester

Write a regex pattern and see matches highlighted in real time against your test text. Capture groups are shown with their indices. A replace field lets you preview substitution results before using the pattern in code.

How to use the Regex Tester

  1. Enter a regex pattern.
  2. Paste test text.
  3. Set flags: case-insensitive, multiline, dotall, Unicode.
  4. View highlighted matches and groups.
  5. Optionally test a replacement string.

Frequently asked questions

Which regex flavour is used?

PCRE2 (PHP's preg_ functions). It supports lookahead, lookbehind, named groups and most modern regex features.

What does the multiline flag do?

It makes ^ and $ match the start/end of each line rather than the start/end of the entire string.

Can I test replacements?

Yes. Enter a replacement string using $1 for group references. The preview shows the result.