How to replace only the last match of a string with preg_replace?

后端 未结 4 1166
时光取名叫无心
时光取名叫无心 2020-12-17 00:17

I have to replace the last match of a string (for example the word foo) in HTML document. The problem is that the structure of the HTML document is always random.

I\

4条回答
提交回复
热议问题