/** * Splits a given Text object based on this regular expression * * @param Text $text The text to split * * @return array<Text> An array of new Text objects based on the given Text, split by this regular expression */ public function split(Text $text) { return $text->fromArray(preg_split($this->raw, (string) $text)); }