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
- Enter a regex pattern.
- Paste test text.
- Set flags: case-insensitive, multiline, dotall, Unicode.
- View highlighted matches and groups.
- 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.