R3m/framework Function reference preg.match

{preg.match(String $pattern, String $subject, String $match_attribute=null, String $flags=PREG_PATTERN_ORDER, Int $offset=0)}

Searches subject for a match to the regular expression given in pattern.

match_attribute the name of the variable where the result is stored.


{preg.match()} returns 1 if the pattern matches given subject, 0 if it does not, or false if an error occurred.

This function may return Boolean false, but may also return a non-Boolean value which evaluates to false.   
Please read the section on Booleans for more information.  
Use the === operator for testing the return value of this function.

More information:


Last modified: 2021-06-07

© 2021 universeorange.com