LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » Internet / Internet Information » How To Extract Email Addresses Using Notepad++?

How To Extract Email Addresses Using Notepad++?

How-To-Extract-Email-Addresses-Using-Notepad++

Having a file, for example, an extraction from your mailbox, and you want to extract only the email addresses? Using Notepad++ and simple regular expression, that’s pretty simple. See below a full example, or, to summarize, open your file, use the 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.

Given the following text file as input, there are 3 easy steps to follow so that you can extract all email addresses contained inside the text.

How-To-Extract-Email-Addresses-Using-Notepad++-1 Text containing email addresses

1st Step – Find Email Addresses Using Regex Match:

Use the find & replace feature of notepad++

Find:
(\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b)
Replace:
\r\n$&\r\n
How-To-Extract-Email-Addresses-Using-Notepad++-2
This adds and new line before and after each email address as shown below.

How-To-Extract-Email-Addresses-Using-Notepad++-3 Email address in a new line

Step 2 – Mark Email Addresses And Bookmark Lines

Mark:
(\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b)
have “Bookmark Line” checked.

How-To-Extract-Email-Addresses-Using-Notepad++-4

Step 3 – Remove Unmarked Lines

Search > Bookmark > Remove Unmarked Lines

How-To-Extract-Email-Addresses-Using-Notepad++-5 Remove unmarked lines in Notepad++

Recommended For You:
How Video Is Transforming Social Media Marketing?

Final Words:

That’s all we have. We hope that you liked this article. If you have any problem with this code while using then feel free to contact us with a full explanation of your problem. We will reply to you as time allows us or If you have any doubts and problems please comment below. We are happy to help you! If you liked this article, Don’t forget to share this with your friends so they can also take benefit from it and leave your precious feedback in our comment form below. Happy development, See you in the next article.

You Like It, Please Share This Recipe With Your Friends Using...

4 Responses to “How To Extract Email Addresses Using Notepad++?”

  1. Gadi Katz says:

    This worked perfectly and saved me a lot of time!
    Thank you very much 🙂

    • EXEIdeas says:

      Welcome here and thanks for reading our article and sharing your view. This will be very helpful to us to let us motivate to provide you with more awesome and valuable content from a different mind. Thanks again.

Leave a Reply

Your email address will not be published. Required fields are marked *