Regex tester — live match highlighting & replace preview
Live regex matching with highlighted captures and a replace preview.
Regular expressions are easier to debug when you can see what they match. Paste your pattern and a sample string, toggle flags (g, i, m, s, u, y), and watch every match highlight in real time. Capture groups appear with their indices and names, and the replace preview lets you see the result of substitution before committing. Common gotchas — backslash escaping in JSON strings, unanchored patterns, greedy vs lazy quantifiers — become obvious when the matches light up. The tool uses the JavaScript regex engine (the same one running in your code), so what you see here is exactly what production will do. Save useful patterns to your sidebar for reuse.