I have a regex that trying to match these phone number format. I'm super close except 1 scenario:
Regex: ^\(?(\d{3})\)?[-\. ]?(\d{3})[-\. ]?(\d{4})$
Phone number format are trying to match:
- (123) 456-7890
- (123) 4567890
- 123-456-7890
- 123-4567890
- 1234567890
- 1234567890
I also want to match this.... there is leading spaces before and after the area code:
[empty spaces] (123) [emtpy spaces] 456-7890