Dark Sterix
Dark Sterix

Reputation: 99

Delete Everything(the rest of the text) after a specific string

How can i delete Everything after a string like 'gnirts'. this might give you a better understanding: Before

and after

Upvotes: 6

Views: 31416

Answers (1)

Denham Coote
Denham Coote

Reputation: 674

Using find and replace:

  1. Hit CTRL-H to open the Replace dialogue box
  2. enter gnirts.* into Find what
  3. leave Replace with empty
  4. Select Regular expression and .matches newline
  5. Click on Replace

enter image description here enter image description here

Upvotes: 11

Related Questions