Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mb_ereg(3) [php man page]

MB_EREG(3)								 1								MB_EREG(3)

mb_ereg - Regular expression match with multibyte support

SYNOPSIS
int mb_ereg (string $pattern, string $string, [array $regs]) DESCRIPTION
Executes the regular expression match with multibyte support. PARAMETERS
o $pattern - The search pattern. o $string - The search string. o $regs - Contains a substring of the matched string. RETURN VALUES
Executes the regular expression match with multibyte support, and returns 1 if matches are found. If the optional $regs parameter was specified, the function returns the byte length of matched part, and the array$regs will contain the substring of matched string. The func- tion returns 1 if it matches with the empty string. If no matches are found or an error happens, FALSE will be returned. NOTES
Note The internal encoding or the character encoding specified by mb_regex_encoding(3) will be used as the character encoding for this function. SEE ALSO
mb_regex_encoding(3), mb_eregi(3). PHP Documentation Group MB_EREG(3)

Check Out this Related Man Page

EREGI(3)								 1								  EREGI(3)

eregi - Case insensitive regular expression match

SYNOPSIS
int eregi (string $pattern, string $string, [array &$regs]) DESCRIPTION
This function is identical to ereg(3) except that it ignores case distinction when matching alphabetic characters. Warning This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged. PARAMETERS
o $pattern - Case insensitive regular expression. o $string - The input string. o $regs - If matches are found for parenthesized substrings of $pattern and the function is called with the third argument $regs, the matches will be stored in the elements of the array $regs. $regs[1] will contain the substring which starts at the first left parenthesis; $regs[2] will contain the substring starting at the second, and so on. $regs[0] will contain a copy of the complete string matched. RETURN VALUES
Returns the length of the matched string if a match for $pattern was found in $string, or FALSE if no matches were found or an error occurred. If the optional parameter $regs was not passed or the length of the matched string is 0, this function returns 1. EXAMPLES
Example #1 eregi(3) example <?php $string = 'XYZ'; if (eregi('z', $string)) { echo "'$string' contains a 'z' or 'Z'!"; } ?> NOTES
Note As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. See the list of differences for help on converting to PCRE. Tip eregi(3) is deprecated as of PHP 5.3.0. preg_match(3) with the i ( PCRE_CASELESS) modifier is the suggested alternative. SEE ALSO
ereg(3), ereg_replace(3), eregi_replace(3), preg_match(3), stripos(3), stristr(3), quotemeta(3). PHP Documentation Group EREGI(3)
Man Page