function matchesPattern(str) {
    return /^([0-9]{3}-){2}[0-9]{4}$/.test(str) ? true : false
}