protected function splitRules(string $rules): array
	{
		$non_escape_bracket  = '((?<!\\\\)(?:\\\\\\\\)*[\[\]])';
		$pipe_not_in_bracket = sprintf(
			'/\|(?=(?:[^\[\]]*%s[^\[\]]*%s)*(?![^\[\]]*%s))/',
			$non_escape_bracket,
			$non_escape_bracket,
			$non_escape_bracket
		);

		$_rules = preg_split(
			$pipe_not_in_bracket,
			$rules
		);

		return array_unique($_rules);
	}
protected function splitRules(string $rules): array
	{
		$non_escape_bracket  = '((?<!\\\\)(?:\\\\\\\\)*[\[\]])';
		$pipe_not_in_bracket = sprintf(
			'/\|(?=(?:[^\[\]]*%s[^\[\]]*%s)*(?![^\[\]]*%s))/',
			$non_escape_bracket,
			$non_escape_bracket,
			$non_escape_bracket
		);

		$_rules = preg_split(
			$pipe_not_in_bracket,
			$rules
		);

		return array_unique($_rules);
	}
protected function splitRules ( string $ rules ) : array { $ non_escape_bracket = '((?<!\\\\)(?:\\\\\\\\)*[\[\]])' ; $ pipe_not_in_bracket = sprintf ( '/\|(?=(?:[^\[\]]*%s[^\[\]]*%s)*(?![^\[\]]*%s))/' , $ non_escape_bracket , $ non_escape_bracket , $ non_escape_bracket ) ; $ _rules = preg_split ( $ pipe_not_in_bracket , $ rules ) ; return array_unique ( $ _rules ) ; }
Split rules string by pipe operator.

@param string $rules

@return array
Split rules string by pipe operator .