Question: PYTHON please help and answer all questions. will upvote :) thank you. Got REGEX INTRODUCTION Got Regex?... Programming Assignment 2 focuses on regular expressions. AssiGNmENT
Got REGEX INTRODUCTION Got Regex?... Programming Assignment 2 focuses on regular expressions. AssiGNmENT \& Discussion The Hedge of Protection Hospital, known as the HOP (cue fun music here), recently split its Admissions department into two sections: AL and MZ. Each department searches for data pertaining to its section and then processes it. For your section, AL, use regexes to do the following: - In order to share the HOP newsletter and other specific information, read data from a copied input file and search it for email addresses in any standard format that begin with A - L to identify your patients' primary contact email; ignore email addresses beginning with MZ. - Separately, search for valid telephone numbers, including (xook) >ock-0000 and 000000 xxox. - To get some general demographic information, search for patient birthdates (format DD/MM/YYY ). Using the year only, select patients who were born prior to the year 2000; ignore all other ages. Name your Python source code file HOP_Regex_YourName.py. Your program will need to: 1. Create an output header welcoming the user. 2. Compile three regexes, one each for phone numbers, dates, and email addresses. - For the email address, address any standard format which ends with .org or .com; ignore all others. Remember to verify that they begin with letters AL and to ignore all others. For the phone number, address phone formats x00xx00x0000x and (x00x) xoxx-x000x. The phone regex from the book addresses more than you need. Do not use it; create one that addresses these formats only. - For the dates, address date format DD/MM/YYYY only. Check that the dates are legitimate by verifying that the month is between 1 and 12 , inclusive, and that the days are between 1 and 31 , inclusive; ignore all others. 3. Use pyperclip to copy data from the clipboard; then process the input against the regexes and other data verification. Remember to copy the data to the clipboard before running your program - else your output will be empty. Consider placing each regex's Use TheHOP_Admissions file provided as your data source (possibly called txt.rtf by output into its own list. D2L). Note: I may test the program against different source data. 5. Print an informative header, additional helpful information, and each Admissions' list 4. Sort each list. the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
