Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1 KB

File metadata and controls

58 lines (40 loc) · 1 KB

CodeAlpha Email Extractor

A Python automation project that extracts email addresses from a text file and saves the unique results into a separate output file.

Features

  • Reads text from input.txt
  • Finds valid email addresses using regular expressions
  • Removes duplicate email addresses
  • Saves extracted emails to extracted_emails.txt
  • Handles missing input files gracefully

Technologies Used

  • Python
  • re module
  • File handling

Project Structure

email_extractor project/
├── email_extractor.py
├── input.txt
├── extracted_emails.txt
└── Readme.md

How to Run

  1. Open the email_extractor project folder.
  2. Add text containing email addresses to input.txt.
  3. Run the script:
python email_extractor.py
  1. Check extracted_emails.txt for the extracted results.

Example

Input:

Contact us at support@example.com or admin@example.com.

Output:

support@example.com
admin@example.com

Author

Ashutosh Tiwari