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 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
Get step-by-step solutions from verified subject matter experts
