0
後,我有這樣的表達:PHP:鏈接的URL的preg_replace%
$content = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1" target="_blank">$1</a>', $content);
但像
http://photoartkalmar.com/Photoart%20Kalmar%20high%20res/Gigapixel/Vienna%2050%20Gigapixel/Donauturm.html
鏈接或與something.jpg
的錨鏈接停止在%或結束。在網址上,所以它沒有使它的全部鏈接只有一半。我怎樣才能解決這個問題?