我有许多文件具有以下结构
@article{mehri_buckling_2016,
title = {Buckling and vibration},
volume = {303},
issn = {00457825},
url = {https://linkinghub.elsevier.com/retrieve/pii/S004578251630010X},
doi = {10.1016/j.cma.2016.01.017},
pages = {75--100},
journaltitle = {Computer Methods in Applied Mechanics and Engineering},
shortjournal = {Computer Methods in Applied Mechanics and Engineering},
author = {Mehri, M. and Asadi, H. and Wang, Q.},
urldate = {2019-11-21},
date = {2016-05},
langid = {english}}
在此示例中,结果应变为
@article{10.1016/j.cma.2016.01.017,
title = {Buckling and vibration},
volume = {303},
issn = {00457825},
url = {https://linkinghub.elsevier.com/retrieve/pii/S004578251630010X},
doi = {10.1016/j.cma.2016.01.017},
pages = {75--100},
journaltitle = {Computer Methods in Applied Mechanics and Engineering},
shortjournal = {Computer Methods in Applied Mechanics and Engineering},
author = {Mehri, M. and Asadi, H. and Wang, Q.},
urldate = {2019-11-21},
date = {2016-05},
langid = {english}}
答案 0 :(得分:1)
使用记事本++:
@article{\K.+?(,\R[\s\S]+?doi = {(.+?))(?=},)
$2$1
. matches newline
屏幕截图(之前):
屏幕截图(之后):