![]() |
The mb_ereg_replace() is an inbuilt function in PHP that is used to search & replace a string using the regular expression. This function is similar to the preg_match() but works on the multibyte string. Syntax: mb_ereg_replace( $pattern, $replacement, $string, $options = null): string|false|null Parameters: The following function accepts four parameters that are described below.
Return Values: This function returns the resulting string if the function successfully executes otherwise it will return “false” on error. Example 1: The following program demonstrates the mb_ereg_replace() function. PHP
Output: 'GeeksforGeeks' Example 2: The following program demonstrates the mb_ereg_replace() function. PHP
Output: 'GeeksGeeksGeeksGeeksGeeksforGeeksGeeksGeeksGeeksGeeks' Reference: https://www.php.net/manual/en/function.mb-ereg-replace.php |
Reffered: https://www.geeksforgeeks.org
PHP |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 15 |