【发布时间】:2014-04-19 12:01:56
【问题描述】:
我有一个 bibtex 文件(由 jabref 生成),我想删除字段中的换行符,例如,
@INPROCEEDINGS{Sims1994b,
author = {Sims, K.},
title = {{Evolving 3D Morphology and Behavior by
Competition.}},
booktitle = {{Proceedings of the 4th International Conference on
Artificial Life}},
pages = {28--39},
year = 1994
}
应该变成
@INPROCEEDINGS{Sims1994b,
author = {Sims, K.},
title = {{Evolving 3D Morphology and Behavior by Competition.}},
booktitle = {{Proceedings of the 4th International Conference on Artificial Life}},
pages = {28--39},
year = 1994
}
不幸的是,我的 regexp-fu 不能胜任这项任务 :-)
【问题讨论】:
-
你已经尝试了什么?
-
我在
"{{\\(.*^J\\).*}}"上玩过各种变体,但我无法捕获一对或两对花括号之间的文本,并且只删除那里的换行符...