主页
PHP
PHP preg_grep() 函数
tryphp_func_regex_preg_grep
运行 ❯
×
更改方向
保存代码
更改主题
<?php $input = [ "Red", "Pink", "Green", "Blue", "Purple" ]; $result = preg_grep("/^p/i", $input); print_r($result); ?>