Reputation: 343
I have a list like:
asd@asd
abcdefgh
abcde@fgh
ijklmnop
I want to remove all lines without the symbol @
. The result should be:
asd@asd
abcde@fgh
Can this be done in Notepad++, and if so, how?
Upvotes: 7
Views: 15740
Reputation: 93046
In the search window, goto the "Mark" tab (If it is missing, you need to upgrade your Notepad++).
Select "Bookmark Line" and "Regular Expression", use the regular expression you already got
^[^@]*$
Press "Mark all"
This results in bookmarks for all Lines with no @
.
Goto the menu point "Search - Bookmark -> "Remove Bookmarked Lines"".
Upvotes: 1
Reputation: 6515
Use find and replace with the following regular expression:
^[^@]*$
Upvotes: 2