记事本++替换文本中的新行 [英] Notepad++ Replace new line inside text

查看:151
本文介绍了记事本++替换文本中的新行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个样本,因为是一百万行之一。
我有这样的文字:

 < 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


  • 检查正则表达式

    li>






  • [^ >] 匹配不是>

  • 的字符
  • {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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆