. Given an alphabet with opening and closing parentheses {), (} only, create a regex that validates all strings containing the sub-string (((). Make sure to support your answer with the proper reasoning. 2. Build a regular expression that captures the 10-digit US phone numbers (10 digits excluding the coun- try code, country code is optional), where # means any number from 0 to 9. Make sure to support your answer with the proper reasoning. It is recommended to use # instead of [0-9] for simplicity and you can follow the rules mentioned below as your test cases (this list is not exhaustive). • ########## • ###-###-#### • (###) ###-#### • ###.###-#### • ### ### #### • ###.###.#### • +1 ### ### ####
. Given an alphabet with opening and closing parentheses {), (} only, create a regex that validates all strings containing the sub-string (((). Make sure to support your answer with the proper reasoning. 2. Build a regular expression that captures the 10-digit US phone numbers (10 digits excluding the coun- try code, country code is optional), where # means any number from 0 to 9. Make sure to support your answer with the proper reasoning. It is recommended to use # instead of [0-9] for simplicity and you can follow the rules mentioned below as your test cases (this list is not exhaustive). • ########## • ###-###-#### • (###) ###-#### • ###.###-#### • ### ### #### • ###.###.#### • +1 ### ### ####
Chapter16: Graphics
Section: Chapter Questions
Problem 14RQ
Related questions
Question
1. Given an alphabet with opening and closing parentheses {), (} only, create a regex that validates all
strings containing the sub-string (((). Make sure to support your answer with the proper reasoning.
2. Build a regular expression that captures the 10-digit US phone numbers (10 digits excluding the coun-
try code, country code is optional), where # means any number from 0 to 9. Make sure to support
your answer with the proper reasoning.
It is recommended to use # instead of [0-9] for simplicity and you can follow the rules mentioned
below as your test cases (this list is not exhaustive).
• ##########
• ###-###-####
• (###) ###-####
• ###.###-####
• ### ### ####
• ###.###.####
• +1 ### ### ####
strings containing the sub-string (((). Make sure to support your answer with the proper reasoning.
2. Build a regular expression that captures the 10-digit US phone numbers (10 digits excluding the coun-
try code, country code is optional), where # means any number from 0 to 9. Make sure to support
your answer with the proper reasoning.
It is recommended to use # instead of [0-9] for simplicity and you can follow the rules mentioned
below as your test cases (this list is not exhaustive).
• ##########
• ###-###-####
• (###) ###-####
• ###.###-####
• ### ### ####
• ###.###.####
• +1 ### ### ####
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT