![]() |
The mb_ereg_search_regs() function is an inbuilt function in PHP that is used for regular expressions to match a given string. If the match is found, then it will return the matched part as an array. Syntax: mb_ereg_search_regs( Parameters: This function accepts two parameters that are described below.
Return Values: The mb_ereg_search_regs() function returns an array that contains the matched part of the multibyte regular expression. If the function successfully executes, it returns “true”, otherwise this function returns “false”. Program 1: The following program demonstrates the mb_ereg_search_regs() function. PHP
Output
array(1) { [0]=> string(7) "Welcome" } Program 2: The following program demonstrates the mb_ereg_search_regs() function. PHP
Output
Pattern is not found Program 3: The following program demonstrates the mb_ereg_search_regs() function. PHP
Output
Quantity: 5 Fruit: oranges Reference: https://www.php.net/manual/en/function.mb-ereg-search-regs.php |
Reffered: https://www.geeksforgeeks.org
PHP |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 10 |