Hello! I am working on the Telephone Number Validator project and am struggle to understand why this regex is returning as true when tested against certain strings.
My regex is:
/\d?\s?-?\d{3}\s?-?\d{3}\s?-?\d{4}/
and the string that it matches is:
"27576227382"
Though given the regex I feel like it should match a string which has exactly 10 or exactly 11 digits because I specifically define how many digits it should have in each spot? I am misunderstanding something somewhere that is always this string to have more digits.