Question
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started