Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

preg_match()

3 tags 1 category

preg_match() — Perform a regular expression match.

preg_match() — Searches subject for a match to the regular expression given in pattern.

Inputs: pattern: The pattern to search for, as a string. subject: The input string. matches: 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. offset: 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).

Returns: preg_match returns 1 if the pattern matches given subject, 0 if it does not, or false on failure.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…