• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/phonenumber/parser.php
  • Класс: BitrixMainPhoneNumberParser
  • Вызов: Parser::__construct
protected function __construct()
{
	$this->phoneNumberStartPattern = '[' . $this->plusChar . $this->validDigits . ']';
	$this->afterPhoneNumberEndPattern = '[^' . $this->validDigits . $this->extensionSeparators . $this->extensionSymbols . ']+$';
	$this->minLengthPhoneNumberPattern = '[' . $this->validDigits . ']{' . static::MIN_LENGTH_FOR_NSN . '}';
	$this->validPunctuation = $this->dashes . $this->slashes . $this->dot . $this->whitespace . $this->brackets . $this->tildes . $this->extensionSeparators . $this->extensionSymbols;
	$this->validPhoneNumber =
		'[' . $this->plusChar . ']{0,1}' .
		'(?:' .
			'[' . $this->validPunctuation . ']*' .
			'[' . $this->validDigits . ']' .
		'){3,}' .
		'[' .
			$this->validPunctuation .
			$this->validDigits .
		']*';

	$this->validPhoneNumberPattern =
		'^(?:'.
			// Either a short two-digit-only phone number
			'^' . $this->minLengthPhoneNumberPattern .'$' .
			// Or a longer fully parsed phone number (min 3 characters)
			'|' . '^' . $this->validPhoneNumber . '$' .
		')$';

}