我找不到一个正确的转义字符序列的好例子来替换这个字符串vi中出现的所有字符:"][“用",”(没有引号)。
我更喜欢通过python或shell脚本来完成,但是vi也可以,只要我可以手动进行全局替换。
发布于 2018-02-26 14:14:14
这应该可以在vi中运行:
:%s/\]\[/,/g
^ ^ ^ ^
| | | |___replace all ocurrences
| | |
| | |_____replace with ,
| |
| |__________replace escaped \]\[
|
|_____________replace in whole filehttps://stackoverflow.com/questions/48965861
复制相似问题