← Back to Challenges
advanced Time limit: 1:30

Conditional Replace

Use interactive substitution (gc flag) to selectively replace occurrences.

Commands
:%s//gc

Conditional Replace

Use interactive substitution (gc flag) to selectively replace occurrences.

Time
0:00
/ 1:30
Editor0 keys
1The cat sat on the mat.
2The cat ate the rat.
3The cat napped on the mat.
-- NORMAL --conditional-replace
Target
1The dog sat on the mat.
2The cat ate the rat.
3The dog napped on the mat.
-- NORMAL --conditional-replace
⚠ Guest mode — Sign in to save your progress and score