我想用 gedit 替换它:
1299465 | 2003415 | 2015-09-06 05:35:34.59662+02
1299449 | 2009400 | 2015-09-06 05:35:32.301683+02
1299450 | 2008465 | 2015-09-06 05:35:32.451393+02
1299457 | 2015211 | 2015-09-06 05:35:33.451049+02
Run Code Online (Sandbox Code Playgroud)
对此:
2003415
2009400
2008465
2015211
Run Code Online (Sandbox Code Playgroud)
我怎样才能用 gedit 做到这一点?
背景:我想用 gedit 而不是 sed/python/.... 因为替换需要交互式完成。
Oli*_*Oli 64
从标准的替换框 ( Control+ H) 中,您可以使用一个小的分组正则表达式来处理此问题:
.*\| (.*) \|.*\1这是在 Ubuntu 14.04 中的默认版本 Gedit 3.10.4 上。