Test, validate and match regular expressions
Validates 10-digit US phone numbers with an optional leading country code '1' and flexible separators (hyphens, dots, or spaces) between digit groups. It captures the area code (3 digits), exchange code (3 digits), and subscriber number (4 digits) for extraction. Accepted formats include 1234567890, 123-456-7890, 123.456.7890, 123 456 7890, and 1-123-456-7890. Note it only checks the digit structure, not actual NANP rules like area codes not starting with 0 or 1.