:% g/^bc/s/\,$/, bprdp/% means the whole file g/ for each line with pattern after '/' in above case pattern is ^bc line beginning with bc s/\,$/, bprdb/ substitute comma (\,) followed by end of line character ($) with ', bprdb'.
I wrote this message based on Vim regular expression and Vim Command Cheat Sheet.
No comments:
Post a Comment