preg_grep

PHP 4, PHP 5, PHP 7, PHP 8
preg_grep - Return array entries that match the pattern

Example #1 preg_grep example

PHP Version:


Example #2 of preg_grep

PHP Version:


Function preg_grep:

Regular Expressions (Perl-Compatible) Functions

Most used PHP functions