PHP 正则表达式函数preg_grep() PHP正则表达式函数 preg_split() PHP 调试函数 debug_backtrace() PHP 正则表达式函数preg_grep() <?php $foods = array("pasta", "steak", "fish", "potatoes"); // find elements beginning with "p", followed by one or more letters. $p_foods = preg_grep("/p(\w+)/", $foods); print "Found food is " . $p_foods[0]; print "Found food is " . $p_foods[1]; ?> PHP正则表达式函数 preg_split() PHP 调试函数 debug_backtrace()