我想搜索以doi = {
或url = {
开头的字符串,然后将其从文件中删除。例如,对于以下数据,我想删除url
和随后的doi
部分。
我不知道如何使用replace
命令,因为我不知道完整的字符串
和
对于Macro
,如果这些线彼此之间没有规则距离,我该怎么办呢。
@article{Carrion2006,
author = {Carrion, M. and Arroyo, J.M.},
doi = {10.1109/TPWRS.2006.876672},
journal = {IEEE Trans. Power Syst.},
title = {{Bla Bla Bla 1}},
pages = {1371--1378},
url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=1664974},
year = {2006}
}
@article{Chandrasekaran2012,
author = {Chandrasekaran, K. and Hemamalini, S. and Simon, Sishaj P. and Padhy, Narayana Prasad},
issn = {03787796},
journal = {Electr. Power Syst. Res.},
pages = {109--119},
publisher = {Elsevier B.V.},
title = {{Bla Bla Bla 2}},
url = {http://linkinghub.elsevier.com/retrieve/pii/S0378779611002471},
volume = {84},
year = {2012}
}
答案 0 :(得分:0)
怎么样:
找到:^(?:doi|url)\s*=\s*[^}]+\},\R
替换为:NOTHING