Test, validate and match regular expressions
Validates Russian phone numbers in two accepted formats: compact (10 consecutive digits, e.g., 89161234567 or +79161234567) or spaced with parentheses (e.g., +7 (916) 123 45 67). The first group captures the country prefix - either an 8 anchored at the string start, a plain 7, or +7. The second group matches either the 10-digit subscriber number directly or the formatted variant with a 3-digit area code in parentheses followed by space-separated digit groups. Commonly used for validating Russian contact numbers in web forms.