Regex Tester & Replacer
Test regular expressions with live matches, groups, and replace preview.
About this tool
Debug regex patterns against sample text — see every match with index and capture groups, highlighted hits, and a replace preview. Handy for log filters, nginx rules, CI patterns, and validation.
What you get
- Live match list with start index and capture groups
- Highlighted matches in the test string
- Replace preview with $1-style backreferences
- Quick presets — everyday, logs, nginx, DevOps/CI
How to use
Enter a pattern and test text. Toggle flags (i, m, g, s), inspect groups, then try a replacement string.
FAQ
How to test a regular expression online?
Enter a pattern and sample text to see every match with start index, highlighted hits, and capture groups live.
How to see capture groups in regex matches?
Each match lists numbered groups so you can verify parentheses capture the intended substrings.
How to preview regex find and replace?
Add a replacement string with $1-style backreferences and read the replace preview before using the pattern in code or config.
What regex flags mean i, m, g, s?
i ignores case, m makes ^/$ match line boundaries, g finds all matches, s lets . match newlines—toggle them to match your engine.
By using this tool you agree to our Terms of Use and Privacy Policy. Results are provided as-is without warranty.