Test, validate and match regular expressions
Matches 10-digit North American phone numbers with an optional country code (a + followed by 1-3 digits), flexible separators (single/double hyphens or whitespace), optional parentheses around the area code, and an optional extension marker (ext, Ext, x, X with digits). Handles formats like (555) 123-4567, +1--555-123-4567, 5551234567, and 555-123-4567 ext. 42. Intended for extracting or validating contact numbers in text with global multiline matching.