Query: preg_grep
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
PREG_GREP(3) 1 PREG_GREP(3) preg_grep - Return array entries that match the patternSYNOPSISarray preg_grep (string $pattern, array $input, [int $flags])DESCRIPTIONReturns the array consisting of the elements of the $input array that match the given $pattern.PARAMETERSo $pattern - The pattern to search for, as a string. o $input - The input array. o $flags - If set to PREG_GREP_INVERT, this function returns the elements of the input array that do not match the given $pattern.RETURN VALUESReturns an array indexed using the keys from the $input array.EXAMPLESExample #1 preg_grep(3) example <?php // return all array elements // containing floating point numbers $fl_array = preg_grep("/^(d+)?.d+$/", $array); ?>SEE ALSOPCRE Patterns, preg_quote(3), preg_match_all(3), preg_filter(3), preg_last_error(3). PHP Documentation Group PREG_GREP(3)
Related Man Pages |
---|
array(0x828abb) - redhat |
array(0x13b5a0) - redhat |
array(0x13b558) - redhat |
preg_split(3) - php |
preg_match_all(3) - php |
Similar Topics in the Unix Linux Community |
---|
Perl regular expression for exclude specific ip range |
REGEX help required and some sed/awk help as well |