📅  最后修改于: 2022-03-11 15:01:40.558000             🧑  作者: Mango
// Checks if a string is a valid americain phone number with regex
var phoneFormatterRegex = function (phoneNumber) {
return /^\d{3}-\d{4}$/.test(phoneNumber);
}