Validate US Telephone Numbers - Using RegExp.prototype[symbol.match](str)]

Here I used this method. If there is no matching values in returning array method returns a null value.

1 Like

The second two arrangements of numbers can be characterized utilizing similar criteria. Since there’s just a single dash between the groupings of digits, it can be given with no unique character. Be that as it may, if there’s a plausibility the string will have a Social Security number without the dashes, you’d need to change the general expression example