This chapter is from the book
U.S. Social Security Numbers
U.S. social security numbers (often abbreviated as SSN) are three sets of digits separated by hyphens; the first set contains three digits, the second set contains two digits, and the third set contains four digits. Since 1972, the first set of three digits have been assigned based on the address provided on the application.
John Smith: 123-45-6789
\ d{ 3} -\ d{ 2} -\ d{ 4}
John Smith: 123-45-6789
\ d{ 3} -\ d{ 2} -\ d{ 4} matches any three digits followed by a hyphen, two digits, a hyphen, and any four digits.