Build, test, and debug regular expressions
This regex matches North American phone numbers (NANP format) with various common formatting styles. It validates numbers with optional country code (+1), optional parentheses around the area code, and separators like hyphens or periods. The pattern enforces NANP rules where area codes and exchange codes must start with digits 2-9.