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.
如何在我的文档中将所有 \cite{something} 实例更改为 [@something]?
我会这样做:
:%s#\v\\cite\{([^}]+)\}#[@\1]#g
\cite{something}请注意,如果您在同一行中有多个标志,则最后一个“g”标志将很重要。
\cite{something}
由于您想替换所有实例,我会用“g”来做。
用这个正则表达式查找:\\cite\{([^\}]+)\} 并替换为:[@\1]
\\cite\{([^\}]+)\}
[@\1]