The Email ID Parser is a Python program designed to extract the username and domain name from an email ID. It validates the format of the input email ID using a simple regular expression, normalizes the email address to lowercase, and handles cases where the domain may have subdomains.
-
Email Format Validation:
- Validates the format of the input email ID using a simple regular expression.
-
Normalization:
- Normalizes the email address to lowercase for consistency.
-
Extraction:
- Extracts the username, subdomain (if any), and main domain from the email ID.
-
Subdomain Handling:
- Handles cases where the domain may have subdomains.
-
Run the Program:
- Execute the program and follow the on-screen prompts.
-
Enter Email ID:
- Enter your email ID when prompted.
-
Extraction:
- The program extracts the username, subdomain (if any), and main domain from the email ID.
-
Continue or Exit:
- Optionally, choose to continue extracting information from more email IDs.
cd EmailParser
python email_id_parser.py
Enter your Email ID: user@example.com
Username: user
No subdomain
Main Domain: example.com
Contributions are welcome! If you have ideas for improvements or encounter any issues, please open an issue or submit a pull request.