I want to use the below regex in my JS that is already working on a "phone number" form field in my company's application.
When I attempt to put it into Regex101's playground and type in 777-777-7777 I cannot get a match. It makes no sense. Anyone know what the issue can be? I am just trying to gain a better understanding of regular expressions as a junior developer.
[2-9]\\d{2}(-){0,1}[2-9]\\d{2}(-){0,1}\\d{4}$