gedit: search and replace with regular expressions

From the standard Replace box (Control+H) you can use a little grouped regex to handle this:

  • Search for: .*\| (.*) \|.*
  • Replace with: \1
  • Check the box that has "Match as regular expression"

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.

Tags:

Gedit