【发布时间】:2020-12-24 05:45:50
【问题描述】:
我有以下脚本
141
00:07:13,000 --> 00:07:16,680
So when you access a
web page such as google.com,
142
00:07:16,751 --> 00:07:20,824
really what you're
accessing is google.com/
143
00:07:20,824 --> 00:07:22,872
and the forward slash there just means
144
00:07:22,780 --> 00:07:26,180
this is the homepage of the site.
我想将两行文本合并为 1 行。例如:
really what you're
accessing is google.com/
看起来像really what you're accessing is google.com/
我正在尝试通过记事本实现这一目标。这是我创建的正则表达式:\D\r\n\D,我将其替换为空格。
运行时,输出为really what you'r ccessing is google.com
缺少第一行的最后一个字符和第二行的第一个字符。
谁能帮我解决这个问题?
【问题讨论】:
-
试试这个:在
Find What中使用(\D)\r\n(\D)。在Replace with中使用$1 $2。看看有没有帮助。 -
这行得通!谢谢 我还可以在此之后添加一些内容以获得空行吗?
-
我会将其添加为答案,您可以将其标记为已接受以结束您的问题
-
是的,你可以通过输入
Find what这个^(\d{3})和Replace with这个\r\n$1来添加一个空行在你已经运行了第一组替换。它可能并不完美,但您可以根据自己的喜好调整该解决方案。 -
您的问题有 2 个答案。您能否接受其中一个答案来结束您的问题?