Home  >  Article  >  Backend Development  >  Warning: preg_grep() [function.preg-grep]: Empty regular expression in

Warning: preg_grep() [function.preg-grep]: Empty regular expression in

WBOY
WBOYOriginal
2016-06-20 12:28:591779browse

新手菜鸟求教,这个问题如何处理:
Warning: preg_grep() [function.preg-grep]: Empty regular expression in 


回复讨论(解决方案)

学到这里卡住了

有没有大神能帮帮忙

贴出你的代码

应该是你的正则表达式不正确(为空)

。。。。。。

$perg='/\d{3,4}-?\d{7,8}/';
$arr=array('043212345678','0431-7654321','12345678');
$preg_arr=preg_grep($prdg,$arr);
var_dump($preg_arr);

?>

$preg_arr=preg_grep( $perg,$arr);

求帮忙看看。。

$perg='/\d{3,4}-?\d{7,8}/';
$arr=array('043212345678','0431-7654321','12345678');
$preg_arr=preg_grep( $prdg,$arr);
var_dump($preg_arr);

一样吗?初学,首先就要学会细心

万分感谢啊,打错了,唉,新手学习中,谢谢了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn