【发布时间】:2015-11-06 07:43:51
【问题描述】:
我有一个这样的文本文件...
$index 57320
$title The vertex-cover polynomial of a graph
$time 1988
$abstract In this paper we define the vertex-cover...
$index 57321
$title Locating stations on rapid transit lines
$time 1978
$index 57322
$title Fast heuristics for large scale covering-location problems
$time 1998
$abstract We propose fast heuristics for large scale...
$index 57323
$title Efficient vector processing on dataflow supercomputer SIGMA-1
$time 2001
$abstract Efficiency in vector handling is the key to obtaining high...
我想将每个linebreak 转换为comma,同时将每个emptyline 转换为linebreak。而例如文本的输出应该是这样的(使用“点”缩短文本...):
$index 57320,$title The vertex-cover...,$time 1988,$abstract In this paper...
$index 57321,$title Locating stations on...,$time 1978
$index 57322,$title Fast heuristics for...,$time 1998,$abstract We propose fast...
$index 57323,$title Efficient vector...,$time 2001,$abstract Efficiency in...
我尝试将\r\n 替换为,,它可以工作,但是如何同时应用将linebreaks 转换为comma 和emptyline 的操作以用作linebreaks 以获得所需的输出。
请在这方面提供帮助。
谢谢!
【问题讨论】:
标签: regex notepad++ line-breaks blank-line