Test, validate and match regular expressions
Matches Spanish phone numbers consisting of 9 digits starting with 9 (landline), 6 or 7 (mobile). An optional prefix group allows a country code: an optional plus sign, 1-2 digits, and an optional dash or space separator (e.g., +34 or 34-). Commonly used for validating Spanish telephone numbers in forms. Note: the character class [9|6|7] also unintentionally matches a literal pipe character.