Delete all lines without the @ character in Notepad ++

I have a list like:

asd@asd
abcdefgh
abcde@fgh
ijklmnop

I want to delete all lines without a character @. The result should be:

 asd@asd
 abcde@fgh

Can this be done in Notepad ++, and if so, how?

+5
source share
3 answers

Try to find:

^[^@]*$

and replace with an empty string.

+19
source

Use search and replace with the following regular expression:

^[^@]*$
+2
source

"" ( , ++).

"Bookmark Line" "Regular Expression", ,

^[^@]*$

" "

@.

" - → " ".

+1

All Articles