Reputation: 115
I have many file with the following structure
@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}}
For this example results should become
@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}}
Upvotes: 0
Views: 33
Reputation: 91518
Using notepad++:
@article{\K.+?(,\R[\s\S]+?doi = {(.+?))(?=},)
$2$1
. matches newline
Screen capture (before):
Screen capture (after):
Upvotes: 1