我以 CSV 格式导出了一些数据,这些数据在文本字段中有一些换行符。我无法让 Excel 正确处理此问题。我只想编辑文件以删除这些换行符。
有效记录以数字开头。我尝试放入\n^([^\d])
Notepad++ 的查找/替换的“查找内容”框,以匹配以非数字开头的任何行和前面的换行符。它匹配正确。在“替换为”框中,我放了一个空格,然后用空格\1
替换换行符并留下匹配的字符。但是,替换根本不起作用,没有任何改变。
我究竟做错了什么?
示例文本:
123,0,1,"This is a single line comment","bob","jim"
124,0,1,"This is a multi line comment w/ newline.
This is the second line of the comment","ted","alfred"
125,0,1,"This is another single line comment","jim","bob"
我想用空格替换“这是第二个...”之前的换行符,以便文件如下所示:
123,0,1,"This is a single line comment","bob","jim"
124,0,1,"This is a multi line comment w/ newline. This is the second line of the comment","ted","alfred"
125,0,1,"This is another single line comment","jim","bob"