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

//preg_match()执行一次正则表达式匹配
 //参数
 //1.正则表达书
 //2.要匹配的字符串
 //3.匹配出来的数组
 //返回匹配的个数

实例

$arr = array('a','b','5c','d','f','g','5e','f');
	var_dump($arr);
	$preg = '/5e/';
	$result = preg_grep($preg,$arr);
	var_dump($result);
	echo '<hr />';

运行实例 »

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

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