假设我有以下href:
.... href="http://localhost/centboox/usedtextbooks/desc/30" ....
我想通过所有这些并在关闭 href 的双引号之前添加* * :
... href="http://localhost/webname/pagename/desc/30*******" ...
星号代表一些输入,例如 ?q=all&a=search_text
我如何通过 PHP 中的 preg_replace 做到这一点。
谢谢