mb_split 使用正则表达式分割多字节字符串

发表日期:2021-07-01 08:55:53 | 来源: | | 浏览(805) 分类:多字节字符串 函数

mb_split

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

mb_split使用正则表达式分割多字节字符串

说明

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

使用正则表达式 pattern 分割多字节 string 并返回结果 array

参数

pattern

正则表达式。

string

待分割的 string

limit
如果指定了可选参数 limit,将最多分割为 limit 个元素。

返回值

array 的结果。

注释

注意:

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

参见

集速网 copyRight © 2015-2022 宁ICP备15000399号-1 宁公网安备 64010402001209号
与其临渊羡鱼,不如退而结网
欢迎转载、分享、引用、推荐、收藏。