Don Alexander Eckford's REGEX Problem Solution
Problem
Extract the Social Security numbers from the following text. In other words, create a REGEX pattern to gather the following SS numbers and nothing else.
Name: Sam Parker Phone: 517-333-1345 SS: 656-45-7752 Dr Lic: 345-678-123-456 Zip Code: 48910-3465 Name: Mary Parker Phone: 517.333.1334 SS: 555-43-5743 Dr Lic: 333.478.646.233 Zip Code: 48910.3464 Name: Joe Spade Phone: 517/289/0453 SS: 666-44-7770 Dr Lic: 123/456/789/001 Zip Code: 48910 Name: Matt Buds Phone: 517 393 1556 SS: 567-66-4321 Dr Lic: 123 654 987 002 Zip Code: 48910 3457 Name: Karen Klutz Phone: 517-393.1446 SS: 567-44-4321 Dr Lic: 123/654-987.002 Zip Code: 48910 3457
Extracted Social Security Numbers
- 656-45-7752
- 555-43-5743
- 666-44-7770
- 567-66-4321
- 567-44-4321