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

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

问题描述

我有这个样本,因为它是一百万行之一.我有这段文字:

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>

我想换成这样:

<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.

推荐答案

Ctrl + H

然后输入

  • 查找内容:([^>])[ ]{1,2}

  • Find what: ([^>])[ ]{1,2}

替换为:1

检查正则表达式

  • [^>] 匹配不是 >

{1,2} 可防止文件可能只有换行符而没有回车符.

The {1,2} protects against a file that may only have a newline and not a carriage return.

1 仅替换分组 ( ) 中的字符.

1 replaces just the character that was in the grouping ( ).

这篇关于Notepad ++替换文本内的新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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