合并具有给定条件的行

时间:2016-08-06 10:50:17

标签: regex gedit

我有一个文件,其中有不同顺序的内容。我想将两个空白行之间出现的行合并为一行。例如:

  


  是
  不   好

     

可以
  它
  被
  DONE   像
  此

  

这不好

     

可以这样做吗

enter image description here

2 个答案:

答案 0 :(得分:1)

通过搜索

替换所有未带有空格的新换行符
\r?\n(?!\r?\n)

并替换为" "

答案 1 :(得分:0)

似乎Gedit不支持General: Request URL:http://localhost/demoPaymentGatway/index.html Request Method:POST Status Code:200 OK Remote Address:[::1]:80 Response Headers: Accept-Ranges:bytes Connection:Keep-Alive Content-Length:1856 Content-Type:text/html Date:Sat, 06 Aug 2016 12:17:17 GMT ETag:"740-5396528fb715b" Keep-Alive:timeout=5, max=100 Last-Modified:Sat, 06 Aug 2016 11:05:25 GMT Server:Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.37 Request Headers: Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding:gzip, deflate Accept-Language:en-US,en;q=0.8 Cache-Control:max-age=0 Connection:keep-alive Content-Length:700 Content-Type:application/x-www-form-urlencoded Cookie:PHPSESSID=el7a4qk56sv4ujo4kou0qf43k4 Host:localhost Origin:null Upgrade-Insecure-Requests:1 User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 Form Data: mihpayid:114256656 mode: status:failure unmappedstatus:userCancelled key:WHlKGc txnid:264997125205 amount:1.0 addedon:2016-08-06 17:47:58 productinfo:productitem firstname:vasu 操作员的外观。这对我有用:

?