![]() |
The mb_ereg_search() is a PHP function used to search & match for a regular expression pattern in a string using multi-byte characters. It is similar to preg_match() but works with multi-byte characters. Syntax: mb_ereg_search(?string $pattern = null, ?string $options = null): bool Parameters: This function accepts the two parameters that are described below:
Return Value: This function returns “true” if the multibyte string matches with a given regular expression otherwise returns “false”. Example 1: The following code demonstrates the mb_ereg_search() function. PHP
Output: Found 'world' in the string Example 2: The following program demonstrates the mb_ereg_serach() function. PHP
Output: The pattern was not found in the target string. Reference: https://www.php.net/manual/en/function.mb-ereg-search.php |
Reffered: https://www.geeksforgeeks.org
PHP |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 15 |