首页 > 技术 > php正则表达式的非贪婪模式

php正则表达式的非贪婪模式

2008年9月25日 Felix_code


$text = '<div class="xxxx">.............</div><div></div>';
preg_match("/^<div class=\"xxxx\">(.*?)<\/div>/",$text,$m);
//$m[0] -> “<div class=”xxxx”>………….</div>”

分类: 技术 标签:
本文的评论功能被关闭了.
文字链接: 电脑初学者上网导航 二十年论坛
粤ICP备06086800号