protected function getNamedCapturesExpressions(array $tokens)
	{
		$exprs = [];
		foreach ($tokens as $token)
		{
			if ($token['type'] !== 'capturingSubpatternStart' || !isset($token['name']))
			{
				continue;
			}

			$expr = $token['content'];
			if (strpos($expr, '|') !== false)
			{
				$expr = '(?:' . $expr . ')';
			}

			$exprs[$token['name']] = $expr;
		}

		return $exprs;
	}
protected function getNamedCapturesExpressions(array $tokens)
	{
		$exprs = [];
		foreach ($tokens as $token)
		{
			if ($token['type'] !== 'capturingSubpatternStart' || !isset($token['name']))
			{
				continue;
			}

			$expr = $token['content'];
			if (strpos($expr, '|') !== false)
			{
				$expr = '(?:' . $expr . ')';
			}

			$exprs[$token['name']] = $expr;
		}

		return $exprs;
	}
protected function getNamedCapturesExpressions ( array $ tokens ) { $ exprs = [ ] ; foreach ( $ tokens as $ token ) { if ( $ token [ 'type' ] !== 'capturingSubpatternStart' || ! isset ( $ token [ 'name' ] ) ) { continue ; } $ expr = $ token [ 'content' ] ; if ( strpos ( $ expr , '|' ) !== false ) { $ expr = '(?:' . $ expr . ')' ; } $ exprs [ $ token [ 'name' ] ] = $ expr ; } return $ exprs ; }
Return the expression used in each named capture

@param  array[] $tokens
@return array
Return the expression used in each named capture