Build, test, and debug regular expressions
Matches North American (NANP) phone numbers line-by-line, supporting an optional +1 country code, optional parentheses around the area code, and flexible separators (spaces, dots, or hyphens). It validates area and exchange codes against NANP rules (no N11 patterns, first digit 2-9) and requires a 4-digit line number, plus an optional extension marked by #, x, ext, or extension followed by 1-15 digits. Captures area code, exchange, line number, and extension for easy extraction.