[英]Would like to insert a line break after every number in Notepad++ (or excel, or Word)
I've OCRed the index of a book, and it's worked well, apart from not recognising some line breaks.我已经对一本书的索引进行了 OCR 处理,效果很好,除了无法识别一些换行符。 I would like to scan the indexes a load of books, and so need to add line breaks in using Notepad ++, ideally.
我想扫描大量书籍的索引,因此理想情况下需要在使用 Notepad ++ 时添加换行符。
I have tried this in Find and Replace:我在查找和替换中尝试过这个:
[0-9]+
[0-9]+
\\r\\n
\\r\\n
Which almost did what I want, but it removed the numbers.这几乎完成了我想要的,但它删除了数字。
it's more 'find numbers and insert line break after them' that I'm trying to do.我正在尝试做的更多是“查找数字并在它们之后插入换行符”。
I would be so grateful for any help!如有任何帮助,我将不胜感激! Thank you!
谢谢!
Here's an example of the index before:这是之前的索引示例:
Bengali-style baked fish 77 biscuits: fennel seed drop-biscuits 155 bread: naan 129 roti 127 simple layered flat breads 126 broad bean thoran 112 burgers: chicken burger 43
And how I'd like it to look after:以及我希望它如何照顾:
Bengali-style baked fish 77
biscuits: fennel seed drop-biscuits 155
bread: naan 129
roti 127
simple layered flat breads 126
broad bean thoran 112
burgers: chicken burger 43
Using Notepad++使用记事本++
\\d+ \\K
\\d+ \\K
\\n
or \\r\\n
for Windows EOL\\n
或\\r\\n
对于 Windows EOLExplanation:解释:
\d+ # 1 or more digits and a space
\K # forget all we have seen until this position
Screenshot:截屏:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.