Test, validate and match regular expressions
Matches US phone numbers with an optional leading country code '1' and optional separators (spaces or hyphens). Supports area codes either wrapped in parentheses like (555) or plain like 555, followed by a 3-digit exchange and 4-digit line number. With the global and multiline flags, it finds valid phone numbers on every line of text. Useful for form validation, extracting phone numbers from documents, and normalizing contact data.