September 2001
Intermediate to advanced
768 pages
32h 45m
English
string ereg(string pattern, string subject, [array matches])
| pattern | Regex pattern to match |
| subject | String to search using the pattern |
| matches | Array in which to store the search results |
Performs POSIX regular expression match against the specified string.
Returns:
FALSE if no match is found; otherwise, the length of the full match if the matches parameter is specified or 1 if it’s not specified
Description:
Searches a string for a regular expression according to the specified POSIX regex pattern. If the matches parameter is supplied, it should be a valid variable, such as $matches, since the function forces it to be passed by reference. Existing contents of this variable are overwritten with the results of the successful search. $matches[0] ...
Read now
Unlock full access