Question: Programming Language: Python . 3. Telephone Number (40 points) Write a computer program with a single regular expression to identify telephone numbers in text that

 Programming Language: Python . 3. Telephone Number (40 points) Write acomputer program with a single regular expression to identify telephone numbers in

Programming Language: Python . 3. Telephone Number (40 points) Write a computer program with a single regular expression to identify telephone numbers in text that comply with the following patterns (surrounded by word boundaries): i. +(country_code)-(area_code)-(prefix)-(line_number) ii. +(country_code)-area_code-prefix-line_number iii. +country_code-area_code-prefix-line_number "country_code" is a two digit string value except 00 "area_code and prefix are a three digit string value except 000" "line_number" is a four digit string value except 0000" Note: Your program should accept a .txt file as command-line argument and print all the matching telephone numbers present in the input .txt file on the screen. Create the FSA corresponding to your regular expression . 3. Telephone Number (40 points) Write a computer program with a single regular expression to identify telephone numbers in text that comply with the following patterns (surrounded by word boundaries): i. +(country_code)-(area_code)-(prefix)-(line_number) ii. +(country_code)-area_code-prefix-line_number iii. +country_code-area_code-prefix-line_number "country_code" is a two digit string value except 00 "area_code and prefix are a three digit string value except 000" "line_number" is a four digit string value except"0000" Note: Your program should accept a .txt file as command-line argument and print all the matching telephone numbers present in the input .txt file on the screen. Create the FSA corresponding to your regular expression

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!