Blogger Information
Blog 250
fans 3
comment 0
visits 321717
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
正则表达式函数:preg_gerp()
梁凯达的博客
Original
828 people have browsed it

//preg_gerp()
 //函数用于用正则表达式匹配数组中的内容
 //如果匹配成功,则返回匹配成功的数据
 //参数:preg_grep([正则表达式],[变量]);
 //返回值,匹配成功的数组单元

实例

$arr = array('a','b','5c','d','f','g','5e','f');
	$preg = '/5e/';
	$result = preg_grep($preg,$arr);
	var_dump($result);
	echo '<hr />';
返回结果为5e的数组
运行实例 »

点击 "运行实例" 按钮查看在线实例

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post