记事本++替换文本中的新行 [英] Notepad++ Replace new line inside text
本文介绍了记事本++替换文本中的新行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的文字:
< tr class =even>
< td>< a href =http://www.ujk.edu.pl/> Jan Kochanowski
人文与科学大学(Swietokrzyska教学法
大学)/ Uniwersytet Humanistyczno Przyrodniczy Jana Kochanowskiego
w Kielcach< / a>< / td>
我想替换成这样:
< tr class =even> Jan Kochanowski University of Humanities and Sciences(Swietokrzyska Pedagogical University)/ Uniwersytet Humanistyczno Przyrodniczy Jana Kochanowskiegow Kielcach
我试过REGEX:(。*)
但是没有工作。 p>
解决方案
用 Ctrl + H 打开替换窗口
然后输入 找到: 替换为: 检查
([^> ;])[\r\\\
] {1,2}
\ 1
正则表达式
[^ >]
匹配不是>
{1,2}
可以防止只有换行符而不是回车的文件。
\ 1
替换分组()
中的字符。
I have this sample, because is one of one million rows with that. I have this text:
<tr class="even">
<td><a href="http://www.ujk.edu.pl/">Jan Kochanowski
University of Humanities and Sciences (Swietokrzyska Pedagogical
University) / Uniwersytet Humanistyczno Przyrodniczy Jana Kochanowskiego
w Kielcach</a></td>
I want to replace to be like that:
<tr class="even">
<td><a href="http://www.ujk.edu.pl/">Jan Kochanowski University of Humanities and Sciences (Swietokrzyska Pedagogical University) / Uniwersytet Humanistyczno Przyrodniczy Jana Kochanowskiegow Kielcach</a></td>
I tried that REGEX: (.*) But didn't work.
解决方案
Open the replace window with Ctrl + H
Then enter
Find what:
([^>])[\r\n]{1,2}
Replace with:
\1
Check
Regular Expression
[^>]
matches a character that isn't a>
The
{1,2}
protects against a file that may only have a newline and not a carriage return.\1
replaces just the character that was in the grouping( )
.
这篇关于记事本++替换文本中的新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文