I want to replace this with 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
to that:
2003415
2009400
2008465
2015211
How can I do this with gedit?
Background: I want to do it with gedit and not sed/python/.... since the replace needs to be done interactive.
From the standard Replace box (Control+H) you can use a little grouped regex to handle this:
.*\| (.*) \|.*
\1
This is on Gedit 3.10.4, the default version in Ubuntu 14.04.
You can use the plugin advanced-find for gedit.
Install the plugin from here.
The instructions (if you don't know it already) on how to implement a gedit plugin is here
Then, use Oli's answer to strip the numbers you want from your question.