问题描述
我们有此订单
129
12
2020
5424180606943758
我们需要这样
5424180606943758|12|2020|129
如何在记事本++或onoter应用程序中执行此操作
解决方法
- Ctrl + H
- 查找内容:
(\d+)\R(\d+)\R(\d+)\R(\d+)\R?
- 替换为:
$4|$3|$2|$1
- 检查 环绕
- 检查 正则表达式
- 全部替换
说明:
(\d+) # group 1,1 or more digits
\R # any kind of linebreak
(\d+) # group 2,1 or more digits
\R # any kind of linebreak
(\d+) # group 3,1 or more digits
\R # any kind of linebreak
(\d+) # group 4,1 or more digits
\R # any kind of linebreak,optional
替换:
$4 # content of group 4
| # a pipe
$3 # content of group 3
| # a pipe
$2 # content of group 2
| # a pipe
$1 # content of group 1
屏幕截图(之前):
屏幕截图(之后):