gsx*_*300 3 regex replace lines notepad++ ultraedit
是否可以用正则表达式搜索/替换来替换每4行UE或NPP中的“分页符”?
之前提交:
#12
ab
cde
ef
#34
ghij
ijk
kl
#5678
uv
w
xyz
...
Run Code Online (Sandbox Code Playgroud)
应该在更换之后
#12 ^t ab ^t cde ^t ef
#34 ^t ghij ^t ijk ^t kl
#5678 ^t uv ^t w ^t xyz
Run Code Online (Sandbox Code Playgroud)
这是完成工作的一种方法:
查找内容:(.+)\R(.+)\R(.+)\R(.+\R)?
替换为:$1\t$2\t$3\t$4
选中Regular Expression
不要选中dot matches newline
并单击Replace All。
说明:
(.+)\R : Capture in group 1 everything until a line break (excluded)
(.+)\R : Capture in group 2 everything until a line break (excluded)
(.+)\R : Capture in group 3 everything until a line break (excluded)
(.+\R)? : Capture in group 4 everything until a line break (included), optional
Run Code Online (Sandbox Code Playgroud)
\R代表任何换行符(即\r或\n或\r\n)
| 归档时间: |
|
| 查看次数: |
853 次 |
| 最近记录: |