Test, validate and match regular expressions
This regex matches Bulgarian phone numbers in international format, specifically landline numbers with area code 2. It requires the country code +359, followed by a separator (space, pipe, or hyphen), then the digit 2, the same separator again, three digits, the same separator once more, and four digits. The separator must be consistent throughout the number due to the backreference. It is useful for extracting or validating Bulgarian phone numbers from text, ensuring they follow the standard +359 2 XXX XXXX or similar format. The word boundary ensures the match is not part of a larger number.