Regex Tester & Replacer
Test regular expressions with live matches, capture groups, highlighted hits, and replace preview.
About this tool
Debug regex patterns against sample text for log filters, nginx location rules, CI path patterns, and input validation. See every match with index and capture groups, plus a replace preview with $1-style backreferences.
What you get
- Live match list with start index and full match text
- Capture groups numbered for each match
- Highlighted matches in the test string
- Replace preview with backreference substitution
- Regex flags: i, m, g, s toggles
- Quick presets for logs, nginx, and DevOps patterns
How to use
Enter a pattern and test text. Toggle flags (i, m, g, s), inspect groups, then try a replacement string and copy the result.
Related searches
- regex tester
- regular expression test
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.
How to test email validation regex before production?
Paste candidate patterns with real and invalid addresses, review every match and capture group, then copy the pattern once it passes your edge cases.
By using this tool you agree to our Terms of Use and Privacy Policy. Results are provided as-is without warranty.