Question: 2. Write down the extended regular expression for following questions. E.g. Social security number in the format of 999-99-9999. Answer: [0-9]{3}-[0-9]{2}-[0-9]{4} 1) Valid absolute pathname

2. Write down the extended regular expression for following questions.

E.g. Social security number in the format of 999-99-9999.

Answer: [0-9]{3}-[0-9]{2}-[0-9]{4}

1) Valid absolute pathname in Windows beginning with C:\ (e.g.

C:\Data\test, C:\Programs\Microsoft\word)

2) An username which is 3 to 16 characters long, begins with a letter,and composed by letters,numbers, underscores and hyphens. (e.g.my_Name, cat, one-1)

3) Valid credit card number for Discover. It has 16 digits and begins with 6011 or 65.

4) Integers in the range between 00 and 59. (e.g. 0, 00, 01, 15, 55, 59)

5)Phone number in any of the following format: 9999999999,(999)999-9999, 999-999-9999.

(Note: all of these formats should be matched by a single 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!