R3m/framework Function reference preg.filter

{preg.filter(String | Array $pattern, String | Array $replacement, String | Array $subject, Int $limit=-1, String $count)}

Perform a regular expression search and replace.
{preg.filter()} is identical to {preg.replace()} except it only returns the (possibly transformed) subjects where there was a match.
For details about how this function works, read the {preg.replace()} documentation.

Returns an array if the subject parameter is an array, or a string otherwise.
If no matches are found, or an error occurred, an empty array is returned when subject is an array or null otherwise.

More information:


Last modified: 2021-06-07

© 2021 universeorange.com