2015-03-03 36 views
0
1234,hello,testing,this is 
a new line,00:22 
1234,hello,testing,this is 
a new line,00:22 

這就是我的CSV,我想刪除每行任何回車(如上圖所示)正則表達式 - 不要取下最後一節車廂(CSV)

應該像這樣:

1234,hello,testing,this is a new line,00:22 
1234,hello,testing,this is a new line,00:22 

你能幫忙嗎?這是我迄今爲止所有:

(?!([0-9]:[0-9]\n)).(\n) 

但它不工作。

+0

你在做搜索和替換?如果是這樣,替換字符串是什麼樣的? – laylarenee 2015-03-03 13:29:32

+0

你是什麼意思不是不..我只是想從csv行中刪除多餘的新行回車... – Gssd 2015-03-03 13:31:17

+1

通常,當你使用正則表達式來搜索/替換內容時,你指定一個「查找正則表達式」和一個「替換字符串」,其中包含反向引用。 – laylarenee 2015-03-03 13:35:37

回答

0

這就是所謂的負向後看:

(?<![0-9]{2}:[0-9]{2})\R