这是我的字符串,我要删除具有yasrcss-inline-css
id及其内容的样式标签
$text = "abc
<style id='yasrcss-inline-css' type='text/css'>
.rateit .rateit-range {
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/star.png) left 0px !important;
}
.rateit .rateit-hover {
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/star.png) left -21px !important;
}
.rateit .rateit-selected {
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/star.png) left -42px !important;
}
div.medium .rateit-range {
/*White*/
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/stars24.png) left 0px !important;
}
div.medium .rateit-hover {
/*Red*/
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/stars24.png) left -29px !important;
}
div.medium .rateit-selected {
/*Yellow*/
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/stars24.png) left -58px !important;
}
/* Creating set 32 */
div.bigstars .rateit-range {
/*White*/
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/stars32.png) left 0px !important;
}
div.bigstars .rateit-hover{
/*red*/
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/stars32.png) left -37px !important;
}
div.bigstars .rateit-selected
{
/*Gold*/
background: url(https://www.newseo.ir/wp-content/plugins/yet-another-stars-rating/img/stars32.png) left -74px !important;
}
</style>
";
这是我的正则表达式
echo preg_replace("/<style id='yasrcss-inline-css' type='text\/css'>(.*?)<\/style>/", " ", $text);
但是它不起作用,我缺少什么吗?