Test JavaScript regex live with highlighted matches, capture groups, and replace mode.
//

Quick syntax

. any char / * 0+ / + 1+ / ? 0-1 / {n,m} n-m / [abc] class / \d digit / \w word / \s whitespace / ^$ anchors / (...) group / | OR / \b boundary

FAQ

Works in other languages?

Basic syntax compatible. Lookbehind, group names vary. JS standard here.

$1, $2 in replace?

Yes, JS String.replace standard supports capture group references.

Server upload?

No, runs in browser JS engine.

Free?

Yes.