2

Is it possible to remove every line in a notepad++ document that has a specific character in it? For example, in my document I have something like:

test1@gmail.com:cool
cool:cool
test2@yahoo.com:cool

I want to get rid of all lines that have the character "@" in them, so after it would look just like this:

cool:cool
Yu Hao
  • 111,229
  • 40
  • 211
  • 267
Fractured
  • 21
  • 2

2 Answers2

4

Yes there is.

Regex: Remove lines containing

  • Search > Find > Mark

  • In the "Find what" textfield, enter "@"

  • Check the "Bookmark line" and "Wrap around" checkboxes

  • Mark All

  • Now select Search > Bookmark > Remove Bookmarked Lines"

Community
  • 1
  • 1
Preston Martin
  • 2,173
  • 2
  • 21
  • 36
2

In find and replace, regex mode:

Find: ^.*@.*$(\r\n)?
Replace with:

enter image description here

Output:

cool:cool
RaGe
  • 19,186
  • 10
  • 54
  • 86