PHP头条
热点:

php正则处置两个字符串间的数据


php 正则处理 两个字符串间的数据

?

?

$str=' this is my string{parent_id} hello';
if( preg_match("/{(.+?)}/isU",$str,$res)) echo $res[1];
#print_r($res);

结果输出parent_id

www.phpzy.comtrue/phprm/34174.htmlTechArticlephp正则处置两个字符串间的数据 php 正则处理 两个字符串间的数据 ? ? $str=' this is my string{parent_id} hello';if( preg_match("/{(.+?)}/isU",$str,$res)) echo $res[1];#print_r($res);结果输出parent_id...

相关文章

PHP之友评论

今天推荐