src/Str.php
public function splitByRegex($delimiterPattern, $limit = null, $flags = null) {
		if ($limit === null) {
			$limit = -1;
		}

		if ($flags === null) {
			$flags = 0;
		}

		return self::fromArray(preg_split($delimiterPattern, $this->rawString, $limit, $flags));
	}
public function splitByRegex($delimiterPattern, $limit = null, $flags = null) {
		if ($limit === null) {
			$limit = -1;
		}

		if ($flags === null) {
			$flags = 0;
		}

		return self::fromArray(preg_split($delimiterPattern, $this->rawString, $limit, $flags));
	}
public function splitByRegex ( $ delimiterPattern , $ limit = null , $ flags = null ) { if ( $ limit === null ) { $ limit = - 1 ; } if ( $ flags === null ) { $ flags = 0 ; } return self :: fromArray ( preg_split ( $ delimiterPattern , $ this -> rawString , $ limit , $ flags ) ) ; }
Splits this string into an array of substrings at the specified delimiter pattern

@param string $delimiterPattern the regular expression (PCRE) to split the string at
@param int|null $limit the maximum number of substrings to return (optional)
@param int|null $flags any combination (bit-wise ORed) of PHP's `PREG_SPLIT_*` flags
@return static[] the new instances of this class
Splits this string into an array of substrings at the specified delimiter pattern