First, search with regular expression:

  • open the "Replace" dialog (Ctrl+h, or menu Search -> Replace).
  • select the "Regular expression" radio button in the bottom-left of the dialog.

Now, fill the following search fields:

  • Find what: @.*$
  • Replace with: (leave empty)

This will find the text @ followed by any number of characters .* to the end of the line $ (end of line part is optional).

The found text is then replaced by nothing (or whatever you want to put in the "Replace with" field).


Find @.* and replace with empty string