Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我很想搜索和替换的行是这样的 -
(assert (if (>= xAltB_0 yAltA_0) (= after_A0_B0 true) (= after_A0_B0 false)))
现在我想替换所有出现的B_0byC_0和B0by C0。
B_0
C_0
B0
C0
我可以使用 vim 搜索和替换的通配符逻辑来做这件事吗?
我使用了这个命令:s/B[_]0/B\10/g,但它并没有真正起作用。
:s/B[_]0/B\10/g
有人可以帮忙吗?谢谢 !
[_]_确切地说是 ie之一_ 如果你的意思是 _ 或什么都不说 0 或 1 是_这样的:_\? 不要忘记把它放在一个组中使用\(并\)与\1 ie一起使用
[_]
_
_\?
\(
\)
\1
:%s/B\(_\?\)0/C\10/g