Less than 1 minute
preg_match_array
Perform a regular expression match on a string using multiple possible regular expressions.
public preg_match_array({Array})
This is the same as calling preg_match() except that $patterns is an array of regular expressions. Execution returns on the first match.
Parameters
Parameter | Type | Description |
---|---|---|
$patterns | string | an array of patterns to search for, as a string |
$subject | string | the input string |
$matches | array | If matches is provided, then it is filled with the results of search. $matches[0] will contain the text that matched the full pattern, $matches[1] will have the text that matched the first captured parenthesized subpattern, and so on. |
$flags | mixed | For details on available flags, see the preg_match() documentation. |
$offset | int | Normally, the search starts from the beginning of the subject string. The optional parameter offset can be used to specify the alternate place from which to start the search (in bytes). |
Generated by Hazaar API Doc Generator