See below a full example, or, to summarize, open your file, use below regexp to find email addresses, add line breaks before and after each of them, and then mark the lines containing an email address and delete the unmarked lines.
Starting with your file – in that example, an extraction of the “TO” addresses of an Outlook 2013 sent emails folder – you might have a lot of strange characters, unnecessary text, email addresses on the same line, …
Next step is to identify all these lines containing only a single email address. Open the Marktab in the Search window. Copy the same regexp as before to identify the email addresses. Make sure the regular expression is checked, along with the Bookmark line option, and start the marking operation with Mark All
To extract emails from a text file, open it using Notepad++ text editor, and apply the instructions above, by using a regular expression, tagging all emails, selecting only the emails, and copying them.
Notepad++ copy all regex matches
To copy all regex matches, use the Marktab in Notepad++ search window. By putting here the regexp, all results matching the regexp will be marked, and can be selected and copied that way.
To remove the HTML tags in Notepad++ from a text, use below regular expression <.*?>|</.*?>, and replace for example with a space. Make sure that the regular expression check box in the search form has been selected.
Notepad++ extract URLs
In the replace menu, accessible with shortcut CTRL+H, use the following regexp, with the regular expression and dot matches new line checked:
And use this replace string in order to get a list of all URLs extracted in the file:
How to copy marked lines in NotePad++ ?
Marked text in Notepad++ can be copied using a regex search, by using the search > mark menu, selecting bookmark line and clicking mark all.
Then, use the search > bookmark > copy bookmarked lines menu, and the result can be pasted in a new file, containing the copy of marked lines.
How to extract emails from text in a few clicks?
To extract emails from text, simply enter a regular expression to find out all the email addresses in a text file, for example an extraction of all your contacts from Microsoft Outlook.
Then, identify the email addresses, and remove the extra lines. Using NotePad++, it can easily be done by following our guide.