Question: Question 4 Write an application that uses regular expressions to check for telephone numbers and email addresses in a text file provided by a user.

Question 4
Write an application that uses regular expressions to check for telephone numbers and email addresses in a text file provided by a user. The following functionality should be included.
The user should be able to select the file to check using a standard file open dialog box.
The file should be displayed in the GUI.
The telephone numbers and email addresses should be highlighted/emphasized in some way in the text.
An email address can be identified by a single @ symbol in the address; telephone numbers could be from any of the following formats:
000-000-0000
000-0000000
0000000000
(000)000-0000
(000)0000000
You may assume that the email addresses and telephone numbers are free standing, that is, they do not have brackets (or any other character) around them.
See an example below.
HINT: Consider using the QTextDocument, and QTextCursor classes.
Question 4 Write an application that uses regular

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 Programming Questions!