title: How can I check if a user-entered string matches a specific format?
body: <p>I'm writing a program to check if a string the user enters is a valid phone number. The only qualification for a valid number is matches the format "ddd-ddd-dddd" where each d is a digit. How do I check if the string matches this format? </p>