2015-05-04 67 views
1

請幫我做這個工作。 我有幾個.txt文件,每一個的開頭爲:.net正則表達式用空格替換換行符

<TABLE class="meta-attributes__table" border="0" cellspacing="0" 
cellpadding="0"> 

我需要更換隻有第一個換行符中的每個文件,這樣的結果看起來像這樣

enter image description here

但沒有觸摸文件中其餘的換行符。

+0

可能的重複[如何替換.NET中的字符串\ *第一個實例?](http://stackoverflow.com/questions/141045/how-do-i-replace-the-first -instance-的-A-字符串中網) –

回答

2

查找:^([^\n]*)\n

替換:$1

使用verbatinum模式@