php preg_replace replacement code is as follows
$_POST["content"] = preg_replace("/<\s*img(.*)".preg_quote($value["name"])."(.*)>/iUs", "<img src="". $attach["bigimg"] ."" />", $_POST["content"]);
now there is a situation that cannot be matched, and one"s knowledge and ability cannot find the reason. Solve the confusion and solve the problem
$_ POST ["content"] is as follows:
<p class="f_center"><img alt="" src="data/attachment/portal/201810/21/201810thxuzgsx0zl.jpeg" style="margin: 0px auto; display: block;" />
$value ["name"] is as follows
data/attachment/portal/201810/21/201810thxuzgsx0zl.jpeg
$attach ["bigimg"] is as follows:
data/attachment/portal/201810/21/150051az6bl1ialal1sqay.jpeg
Why doesn"t it match? Also ask the great god to solve the doubt, thank you very much!