如果行以某个文本或字符(例如$
)结尾,我该如何合并两行?
例如我怎样才能从
LU039F1R 5298.329, 239.725, 769.615, $
-0.17307, -0.01813, 0.98474
LU039G1L 5309.644, -240.726, 762.655, $
0.99595, -0.07970, -0.04152
到
LU039F1R 5298.329, 239.725, 769.615, -0.17307, -0.01813, 0.98474
LU039G1L 5309.644, -240.726, 762.655,0.99595, -0.07970, -0.04152
答案1
- Ctrl+H
- 找什么:
\$\s*
- 用。。。来代替:
LEAVE EMPTY
- 检查环绕
- 检查正则表达式
- Replace all
解释:
\$ : $ character, it have to be escaped because it's a special character
\s* : 0 or more space character, including line break
给定示例的结果:
LU039F1R 5298.329, 239.725, 769.615, -0.17307, -0.01813, 0.98474
LU039G1L 5309.644, -240.726, 762.655, 0.99595, -0.07970, -0.04152