If is a valid SSN get the complete SSN if ssn is with ** or not valid then get the last 4 Digit . Thanks.
Current regex: (?<=Your social security number\s?\r?\n?)[\d-]+
Input : Your first name and middle initial Paul R Last name Staff Your social security number 100-80-0769
If joint return, spouse’s first name and middle initial Judasth R Last name Staff Spouse’s social security number 153-46-9152
Output: 100-80-0769
Input : Your first name and middle initial Paul R Last name Staff Your social security number ***-**-0779
If joint return, spouse’s first name and middle initial Judasth R Last name Staff Spouse’s social security number 155-86-9354
Output: 0779