$string = preg_replace("_\[soundcloud\]/http:\/\/soundcloud.com\/(.*)/\[/soundcloud\]_is", "<iframe width=\"100%\" height=\"166\" scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?url=\$0\"></iframe>", $string);
你好再次Stackoverflow!Soundcloud PHP ubb分析器
我想我的UBB解析器使用preg_replace
以上支持的SoundCloud的鏈接,通過解析[soundcloud](url)[/soundcloud]
到
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url= (url) "></iframe>
,但是這是行不通的。
有人可以幫助我什麼是我的正則表達式錯誤?
在此先感謝!
與'〜\ [的SoundCloud] https://soundcloud.com解決它( 。*?)\ [/ soundcloud]〜is &&