Regex Tester

Write a pattern and test string — matches highlight as you type. Inspect capture groups, switch to replace or split, and read a plain-English breakdown of every token. Nothing leaves your browser.

/ /{{flags}}
✕ {{error}}
Enter a pattern to begin. ✓ Valid — {{matches.length}} match{{matches.length===1?'':'es'}}

Test string

{{ num }}

Result

Explanation

A valid pattern is explained token by token here.

{{grp.h}}

{{r[0]}}{{r[1]}}

About this tool

Uses your browser's native RegExp engine, so matches, replace and split behave exactly like they would in JavaScript — the explainer just walks the pattern token by token and describes each one in plain English.

Everything runs locally as you type. Your pattern and test string are never sent anywhere.