Course contentsShow
JavaScript
Lesson 1706 of 2,72336. Regular ExpressionsPro lesson

Capture Groups with replace()

Use $1, $2, or $<name> in replacement strings to insert captured group values when replacing text.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.