时间:2021-07-01 10:21:17 帮助过:17人阅读
$str=" 【中药名】艾叶 aiye";
preg_match('/【中药名<\/strong>】(.*)<\/p>/iUs',$str,$match1);
$str=" 【中药名】艾叶 aiye";
preg_match('/【中药名<\/strong>】(.*)<\/p>/iUs',$str,$match1);
print_r($match1);
Array怎么不行?
(
[0] => 【中药名】艾叶 aiye
[1] => 艾叶 aiye
)
$str=" 【中药名】艾叶 aiye";
preg_match('/【中药名<\/strong>】.*(\w+)<\/p>/iUs',$str,$match1);
print_r($match1);
Array
(
[0] => 【中药名】艾叶 aiye
[1] => aiye
)