technical
·
9 min
Regex Capture Groups Explained: $1, $&, and $<name> (2026)
Understand regex capture groups, backreferences, and the $1, $&, and $<name> replacement tokens — with copy-paste JavaScript examples that actually work.