• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/entity/address/converter/stringtemplateconverter.php
  • Класс: BitrixLocationEntityAddressConverterStringTemplateConverter
  • Вызов: StringTemplateConverter::parseGroupStart
private function parseGroupStart(array $context): array
{
	$matches = null;
	//                 [", ", [ADDRESS_LINE_1:N,ADDRESS_LINE_2,"Text",LOCALITY,ADM_LEVEL_2]]
	// Are looking for ^^^^^^^^
	if (preg_match(
			'/' . self::REGEX_GROUP_PART_BEFORE_FIELDS . '/ms' . BX_UTF_PCRE_MODIFIER,
			$context['template'],
			$matches,
			PREG_OFFSET_CAPTURE,
			$context['position']
		)
	)
	{
		$context['info']['groupStartPosition'] = $matches[3][1];
		$context['info']['groupDelimiterStartPosition'] = $matches[4][1];
	}
	else
	{
		$this->addContextError($context, self::ERR_PARSE_GROUP_START, $context['position']);
	}

	return $context;
}