如何使用preg_replace函数从字符串中删除% ?
这是我目前拥有的,但 % 符号阻止了 twitter 分享按钮的处理:
<div class="twitter">
<a href="http://twitter.com/share?text=Just%20Sorc\'d:%20%20'. preg_replace('/((?:http|https|ftp):\/\/(?:[A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?[^\s\"\']+)/i','<a href="$1" rel="nofollow" target="blank">$1</a>',$post).'%20--%20via:%20%20http://www.sorcd.com/'.$session_user_id.'%20%20at%20%20" target="_blank" data-count="none"><img src="https://abs.twimg.com/a/1378977615/images/resources/twitter-bird-white-on-blue.png" width="16px" alt="Tweet"></a>
</div>