Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Write a regular expression to match SSNs as per the following rules: Assume SSNs do not start with a 0 SSNs can start or end
- Write a regular expression to match SSNs as per the following rules:
- Assume SSNs do not start with a 0
- SSNs can start or end a line or, both
- SSNs can be followed or preceded by a whitespace
- SSNs can be followed or preceded by the punctuation symbol set: { , . ; : ? ! }
- Also, match SSNs of the form xx-xxx-9999 OR XX-XXX-9999, where only the last 4 digits are exposed. For simplicity, assume a string xX-XXXx-9999 will also match
- The symbol in the SSNs is optional.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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