mb_split

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

mb_split使用正則表達式分割多字節(jié)字符串

說明

mb_split(string $pattern, string $string, int $limit = -1): array

使用正則表達式 pattern 分割多字節(jié) string 并返回結(jié)果 array。

參數(shù)

pattern

正則表達式。

string

待分割的 string。

limit
如果指定了可選參數(shù) limit,將最多分割為 limit 個元素。

返回值

array 的結(jié)果。

注釋

注意:

The character encoding specified by mb_regex_encoding() will be used as the character encoding for this function by default.

參見