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
  • 119,891
  • 44
  • 235
  • 294
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,789
  • 3
  • 26
  • 42
2

In find and replace, regex mode:

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

enter image description here

Output:

cool:cool
RaGe
  • 22,696
  • 11
  • 72
  • 104