Question
Q2: Write a program in python to read file1.txt and try to extract all the email addresses and phone number you will find in this
Q2: Write a program in python to read file1.txt and try to extract all the email addresses and phone number you will find in this file.
Requirements:
- Write a module naming py_find, which have py_find.emails, and py_find.phones to extract the information form text by using regular expression.
- Using Handle error in main program to handle file not found and other exceptions.
- Need to download the file1.txt from lab4.
- Need to show the exception when there is no exist file.
Console
Starting Lab week 4
################################
Name:
Student_ID: 00000000000 # replace 00000000000 with your student ID
Date: Feb 2, 2021
Desc: Running Question 2
################################
File name: file1.txt
Line number: 5 Type: email Contain: user@demo.com
Line number: 8 Type: email Contain: user@demo.com
Line number: 10 Type: phone Contain: 666-233-0988
File1.txt link
https://learn-us-east-1-prod-fleet02-xythos.content.blackboardcdn.com/5c082fb7a0cdb/19510654?X-Blackboard-Expiration=1613271600000&X-Blackboard-Signature=oP5Ljv%2FoGd0OZbi3hqiUb5i7enElPdEd%2BmydNeWvNqs%3D&X-Blackboard-Client-Id=100885&response-cache-control=private%2C%20max-age%3D21600&response-content-disposition=inline%3B%20filename%2A%3DUTF-8%27%27file1.txt&response-content-type=text%2Fplain&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210213T210000Z&X-Amz-SignedHeaders=host&X-Amz-Expires=21600&X-Amz-Credential=AKIAZH6WM4PL5SJBSTP6%2F20210213%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=ed35f768869aa0a7e0421b850d59d1d978d6e7c8996e45349583b698a7f06d41
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started