From 4dbe32f18321eebf4374b159e2ee142e8d92d7fc Mon Sep 17 00:00:00 2001 From: Rui Hirokawa Date: Sat, 9 Mar 2002 23:32:07 +0000 Subject: [PATCH] added functions for multibyte regular expression. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@72609 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/mbstring.xml | 609 ++++++++++++++++++++++++++++++++++++++++- functions/wddx.xml | 4 +- 2 files changed, 610 insertions(+), 3 deletions(-) diff --git a/functions/mbstring.xml b/functions/mbstring.xml index 99a99752c1..550f17ec8c 100644 --- a/functions/mbstring.xml +++ b/functions/mbstring.xml @@ -1,5 +1,5 @@ - + Multi-Byte String Functions Multi-Byte String @@ -1850,6 +1850,613 @@ $convmap = array ( + + + mb_regex_encoding + + Returns current encoding for multibyte regex as string + + + + Description + + stringmb_regex_encoding + + stringencoding + + + &warn.experimental.func; + + mb_regex_encoding returns the character + encoding used by multibyte regex functions. + + + If the optional parameter encoding is + specified, it is set to the character encoding for multibyte + regex. The default value is the internal character encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_internal_encoding, + mb_ereg + + + + + + + mb_ereg + Regular expression match with multibyte support + + + Description + + intmb_ereg + stringpattern + stringstring + + arrayregs + + + &warn.experimental.func; + + mb_ereg executes the regular expression + match with multibyte support, and returns 1 if matches are found. + If the optional third parameter was specified, the function + returns the byte length of matched part, and therarray + regs will contain the substring of matched + string. The functions returns 1 if it matches with the empty + string. It no matche found or error happend, &false; will be + returned. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_eregi + + + + + + + mb_eregi + + Regular expression match ignoring case with multibyte support + + + + Description + + intmb_eregi + stringpattern + stringstring + + arrayregs + + + &warn.experimental.func; + + mb_eregi executes the regular expression + match with multibyte support, and returns 1 if matches are found. + This function ignore case. + If the optional third parameter was specified, the function + returns the byte length of matched part, and therarray + regs will contain the substring of matched + string. The functions returns 1 if it matches with the empty + string. It no matche found or error happend, &false; will be + returned. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg. + + + + + + + mb_ereg_replace + Replace regular expression with multibyte support + + + Description + + stringmb_ereg_replace + stringpattern + stringreplacement + stringstring + + arrayoption + + + &warn.experimental.func; + + mb_ereg_replace scans + string for matches to + pattern, then replaces the matched text + with replacement and returns the result + string or &false; on error. Multibyte character can be used in + pattern. + + + Matching condition can be set by option + parameter. If i is specified for this + parameter, the case will be ignored. If x is + specified, white space will be ignored. If m + is specified, match will be executed in multiline mode and line + break will be included in '.'. If p is + specified, match will be executed in POSIX mode, line break + will be considered as normal character. If e + is specified, replacement string will be + evaluated as PHP expression. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_eregi_replace. + + + + + + + mb_eregi_replace + + Replace regular expression with multibyte support + ignoring case + + + + Description + + stringmb_eregi_replace + stringpattern + stringreplace + stringstring + + &warn.experimental.func; + + mb_ereg_replace scans + string for matches to + pattern, then replaces the matched text + with replacement and returns the result + string or &false; on error. Multibyte character can be used in + pattern. The case will be ignored. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg_replace. + + + + + + + mb_split + Split multibyte string using regular expression + + + Description + + arraymb_split + stringpattern + stringstring + + intlimit + + + &warn.experimental.func; + + mb_split split multibyte + string using regular expression + pattern and returns the result as an + array. + + + If optional parameter limit is specified, + it will be split in limit elements as + maximum. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg. + + + + + + + mb_ereg_match + + Regular expression match for multibyte string + + + + Description + + boolmb_ereg_match + stringpattern + stringstring + + stringoption + + + &warn.experimental.func; + + mb_ereg_match returns &true; if + string matches regular expression + pattern, &false; if not. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg. + + + + + + + mb_ereg_search + + Multibyte regular expression match for predefined multibyte string + + + + Description + + boolmb_ereg_search + + stringpattern + + + stringoption + + + &warn.experimental.func; + + mb_ereg_search returns &true; if the + multibyte string matches with the regular expression, &false; for + otherwise. The string for matching is set by + mb_ereg_search_init. If + pattern is not specified, the previous one + is used. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg_search_init. + + + + + + + mb_ereg_search_pos + + Return position and length of matched part of multibyte regular + expression for predefined multibyte string + + + + Description + + arraymb_ereg_search_pos + + stringpattern + + + stringoption + + + &warn.experimental.func; + + mb_ereg_search_pos returns an array including + position of matched part for multibyte regular expression. + The first element of the array will be the beggining of matched + part, the second element will be length (bytes) of matched part. + It returns &false; on error. + + + The string for match is specified by + mb_ereg_search_init. It it is not specified, + the previous one will be used. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg_search_init. + + + + + + + mb_ereg_search_regs + + Returns the matched part of multibyte regular expression + + + + Description + + arraymb_ereg_search_regs + + stringpattern + + + stringoption + + + &warn.experimental.func; + + mb_ereg_search_regs executes the multibyte + regular expression match, and if there are some matched part, it + returns an array including substring of matched part as first + element, the first grouped part with brackets as second element, + the second grouped part as third element, and so on. It returns + &false; on error. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg_search_init. + + + + + + + mb_ereg_search_init + + Setup string and regular expression for multibyte regular + expression match + + + + Description + + arraymb_ereg_search_init + stringstring + + stringpattern + + + stringoption + + + &warn.experimental.func; + + mb_ereg_search_init sets + string and pattern + for multibyte regular expression. These values are used for + mb_ereg_search, + mb_ereg_search_pos, + mb_ereg_search_regs. It returns &true; for + success, &false; for error. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg_search_regs. + + + + + + + mb_ereg_search_getregs + + Retrive the result from the last multibyte regular expression + match + + + + Description + + arraymb_ereg_search_getregs + + + &warn.experimental.func; + + mb_ereg_search_getregs returns an array + including the sub-string of matched part by last + mb_ereg_search, + mb_ereg_search_pos, + mb_ereg_search_regs. If there are some + maches, the first element will have the matched sub-string, the + second element will have the first part grouped with brackets, + the third element will have the second part grouped with + brackets, and so on. It returns &false; on error; + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg_search_init. + + + + + + + mb_ereg_search_getpos + + Returns start point for next regular expression match + + + + Description + + arraymb_ereg_search_getpos + + + &warn.experimental.func; + + mb_ereg_search_getpos returns + the point to start regular expression match for + mb_ereg_search, + mb_ereg_search_pos, + mb_ereg_search_regs. The position is + represented by bytes from the head of string. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg_search_setpos. + + + + + + + mb_ereg_search_setpos + + Set start point of next regular expression match + + + + Description + + arraymb_ereg_search_setpos + + + &warn.experimental.func; + + mb_ereg_search_setpos sets the starting + point of match for mb_ereg_search. + + + The internal encoding or the character encoding specified in + mb_regex_encoding will be used as character + encoding. + + + + This function is supported in PHP 4.2.0 or higher. + + + + See also: mb_regex_encoding, + mb_ereg_search_init. + + + + + WDDX Functions WDDX @@ -132,7 +132,7 @@ print $packet; - wddx_serialize_vars example + <function>wddx_serialize_vars</function> example