I have data that looks like this:
母音,vowel
備考,note, remarks, NB
基本形,,fundamental form, basic form, basic pattern, basic model, basic type, prototype
受身,,the defensive, passive attitude, passivity, passiveness, the passive, passive voice, ukemi (the art of falling safely)
受身形,passive voice, passive form
否定,negation, denial, repudiation, NOT operation
不規則,irregularity, unsteadiness, disorderly
How to replace every occurrences except the first one on every line?
I want to replace every ,
on every line except the first occurrence of ,
on every line.
Result:
母音,vowel
備考,noteREPLACED remarksREPLACED NB
基本形,REPLACEDfundamental formREPLACED basic formREPLACED basic patternREPLACED basic modelREPLACED basic typeREPLACED prototype
受身,REPLACEDthe defensiveREPLACED passive attitudeREPLACED passivityREPLACED passivenessREPLACED the passiveREPLACED passive voiceREPLACED ukemi (the art of falling safely)
受身形,passive voiceREPLACED passive form
否定,negationREPLACED denialREPLACED repudiationREPLACED NOT operation
不規則,irregularityREPLACED unsteadinessREPLACED disorderly
You can use positive lookbehind for this:
:%s/\m\%(,.*\)\@<=,/REPLACED/g
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With