Using Regular Expressions (regex) to Extract Emails and Phone Numbers
Level: Real-World
Project Brief
Your task for this project is to extract the email addresses and phone numbers from a piece of text.
Project Instructions
Download this text file. The file contains the following text:
"Contact us at support@example.com or marketing@example.com. For urgent queries, call us at (123) 456-7890 or 123.456.7890. Alternatively, reach out on 123-456-7890.”Write a script that extracts all the emails and all the phone numbers from that text file and prints them out in the terminal.
Expected Output
Keep reading with a 7-day free trial
Subscribe to Daily Python Projects to keep reading this post and get 7 days of free access to the full post archives.


