Test, validate and match regular expressions
Matches US phone numbers with an optional leading country code '1', an area code either wrapped in parentheses or as plain digits, and 7-digit exchange/subscriber numbers separated by optional hyphens or spaces. Accepts formats like (123) 456-7890, 123-456-7890, 1234567890, and 1 (123) 456-7890. With global and multiline flags, it is well suited for validating multiple phone number entries in forms or line-based text.