🧪 Regex Tester

Live match highlighting, capture groups, and replace preview.

How it works

The pattern is compiled with JavaScript's native RegExp engine using the flags you select. Matches are highlighted in the test string, and each match's capture groups are listed in the table below. The replace section runs String.replace() live so you can preview a substitution before using it elsewhere. Everything runs locally in your browser.