2013-02-21 41 views
2

文件是如何在文件中每隔二行之前添加字符串

[email protected],[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 
[email protected] 

輸出應該是:

U|[email protected],[email protected] 
D|[email protected] 
R|[email protected] 
U|[email protected] 
D|[email protected] 
R|[email protected] 

我想每3個字符之後追加特定的字符串。

+0

混淆的問題。 '每三分之一線以前的字符串?或者每個第三個字符之後的字符串?或'每行之前的字符串'?女士,請下定決心。 – SparKot 2013-02-21 06:53:32

+0

每三行之前的字符串。 [不在字符之前/之後] – Pooja 2013-02-21 07:01:32

+0

我想在每個第3行前追加U,然後與D和R相同,但是我要追加的字符不同。我想在每行之前追加特定的字符。 – Pooja 2013-02-21 07:06:49

回答

相關問題