2014-01-11 87 views
1

我喜歡搜索以doi = {url = {開頭的字符串,然後將其從文件中刪除。例如,對於以下數據,我希望刪除url以及隨後的doi部分。Notepad ++條件宏

我不知道我怎樣才能使用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

如何:

查找內容:^(?:doi|url)\s*=\s*[^}]+\},\R
替換:NOTHING