mb_ereg Regular expression match with multibyte support
发表日期:2021-07-01 08:55:52 | 来源: | | 浏览(1456) 分类:多字节字符串 函数
mb_ereg
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
mb_ereg — Regular expression match with multibyte support
说明
$pattern, string $string, array &$matches = null): boolExecutes the regular expression match with multibyte support.
参数
-
pattern -
The search pattern.
-
string -
The search string.
-
matches -
If matches are found for parenthesized substrings of
patternand the function is called with the third argumentmatches, the matches will be stored in the elements of the arraymatches. If no matches are found,matchesis set to an empty array.$matches[1] will contain the substring which starts at the first left parenthesis; $matches[2] will contain the substring starting at the second, and so on. $matches[0] will contain a copy of the complete string matched.
返回值
Returns whether pattern matches string.
更新日志
| 版本 | 说明 |
|---|---|
| 8.0.0 |
This function returns true on success now. Previously, it returned the byte length
of the matched string if a match for pattern was found in
string and matches was passed.
If the optional parameter matches was not passed or
the length of the matched string was 0, this function returned 1.
|
| 7.1.0 |
mb_ereg() will now set matches to
an empty array, if nothing matched. Formerly,
matches was not modified in that case.
|
注释
注意:
mb_regex_encoding() 指定的内部编码或字符编码将会当作此函数用的字符编码。
参见
- mb_regex_encoding() - Set/Get character encoding for multibyte regex
- mb_eregi() - Regular expression match ignoring case with multibyte support
- PHP(0)
- PHP杂项(34)
- PHP基础-李炎恢系列课程(20)
- 中文函数手册(0)
- 错误处理 函数(13)
- OPcache 函数(6)
- PHP 选项/信息 函数(54)
- Zip 函数(10)
- Hash 函数(15)
- OpenSSL 函数(63)
- Date/Time 函数(51)
- 目录函数(9)
- Fileinfo 函数(6)
- iconv 函数(11)
- 文件系统函数(81)
- 多字节字符串 函数(57)
- mb_check_encoding 检查字符串在指定的编码里是否有效(0)
- mb_convert_case 对字符串进行大小写转换(0)
- mb_convert_encoding 转换字符的编码(0)
- mb_convert_kana Convert "kana" one from another ("zen-kaku", "han-kaku" and more)(0)
- mb_convert_variables 转换一个或多个变量的字符编码(0)
- mb_decode_mimeheader 解码 MIME 头字段中的字符串(0)
- mb_decode_numericentity 根据 HTML 数字字符串解码成字符(0)
- mb_detect_encoding 检测字符的编码(0)
- mb_detect_order 设置/获取 字符编码的检测顺序(0)
- mb_encode_mimeheader 为 MIME 头编码字符串(0)
- mb_encode_numericentity Encode character to HTML numeric string reference(0)
- mb_encoding_aliases Get aliases of a known encoding type(0)
- mb_ereg_match Regular expression match for multibyte string(0)
- mb_ereg_replace_callback Perform a regular expression search and replace with multibyte support using a callback(0)
- mb_ereg_replace Replace regular expression with multibyte support(0)
- mb_ereg_search_getpos Returns start point for next regular expression match(0)
- mb_ereg_search_getregs Retrieve the result from the last multibyte regular expression match(0)
- mb_ereg_search_init Setup string and regular expression for a multibyte regular expression match(0)
- mb_ereg_search_pos Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte string(0)
- mb_ereg_search_regs Returns the matched part of a multibyte regular expression(0)
- mb_ereg_search_setpos Set start point of next regular expression match(0)
- mb_ereg_search Multibyte regular expression match for predefined multibyte string(0)
- mb_ereg Regular expression match with multibyte support(0)
- mb_eregi_replace Replace regular expression with multibyte support ignoring case(0)
- mb_eregi Regular expression match ignoring case with multibyte support(0)
- mb_get_info 获取 mbstring 的内部设置(0)
- mb_http_input 检测 HTTP 输入字符编码(0)
- mb_http_output 设置/获取 HTTP 输出字符编码(0)
- mb_internal_encoding 设置/获取内部字符编码(0)
- mb_language 设置/获取当前的语言(0)
- mb_list_encodings 返回所有支持编码的数组(0)
- mb_output_handler 在输出缓冲中转换字符编码的回调函数(0)
- mb_parse_str 解析 GET/POST/COOKIE 数据并设置全局变量(0)
- mb_preferred_mime_name 获取 MIME 字符串(0)
- mb_regex_encoding Set/Get character encoding for multibyte regex(0)
- mb_regex_set_options Set/Get the default options for mbregex functions(0)
- mb_scrub Description(0)
- mb_send_mail 发送编码过的邮件(0)
- mb_split 使用正则表达式分割多字节字符串(0)
- mb_str_split Given a multibyte string, return an array of its characters(0)
- mb_strcut 获取字符的一部分(0)
- mb_strimwidth 获取按指定宽度截断的字符串(0)
- mb_stripos 大小写不敏感地查找字符串在另一个字符串中首次出现的位置(0)
- mb_stristr 大小写不敏感地查找字符串在另一个字符串里的首次出现(0)
- mb_strlen 获取字符串的长度(0)
- mb_strpos 查找字符串在另一个字符串中首次出现的位置(0)
- mb_strrchr 查找指定字符在另一个字符串中最后一次的出现(0)
- mb_strrichr 大小写不敏感地查找指定字符在另一个字符串中最后一次的出现(0)
- mb_strripos 大小写不敏感地在字符串中查找一个字符串最后出现的位置(0)
- mb_strrpos 查找字符串在一个字符串中最后出现的位置(0)
- mb_strstr 查找字符串在另一个字符串里的首次出现(0)
- mb_strtolower 使字符串小写(0)
- mb_strtoupper 使字符串大写(0)
- mb_strwidth 返回字符串的宽度(0)
- mb_substitute_character 设置/获取替代字符(0)
- mb_substr_count 统计字符串出现的次数(0)
- mb_substr 获取部分字符串(0)
- GD 和图像处理 函数(114)
- 可交换图像信息(5)
- Math 函数(50)
- 程序执行函数(11)
- PCNTL 函数(23)
- JSON 函数(4)
- SPL 函数(15)
- URL 函数(10)
- cURL 函数(32)
- 网络 函数(33)
- FTP 函数(36)
- Session 函数(23)
- PCRE 函数(11)
- PCRE 正则语法(19)
- 数组 函数(81)
- 类/对象 函数(18)
- 函数处理 函数(13)
- 变量处理 函数(37)
- SimpleXML 函数(3)
- 杂项 函数(31)
- 字符串 函数(101)
宁公网安备 64010402001209号