Problem
Make a PHP function, matchSSN($str) that takes a string representing a social security number as a parameter. The function should return true if the SSN is valid, and false if it is not.
An SSN consists of 9 digits that are sometimes, but not always, separated by dashes between the 3rd and 4th digits and between the 5th and 6th digits (e.g. 123-45-6789). Use regular expressions in your solution (e.g. preg_match). [4 points]