我想知道最好的正則表達式替換此字符串與VID_ID它使用正則表達式預浸更換
$code = '<object width="420" height="345"><br />
<param name="movie" value="http://www.badoobook.com/clips/swf/player.swf"></param><br />
<param name="allowFullScreen" value="true"></param><param name="flashvars" value="vid_id=100226&MainURL=http%3A%2F%2Fwww.bado obook.com%2Fclips&em=1"><br />
<embed src="http://www.badoobook.com/clips/swf/player.swf" flashvars="vid_id=100226&MainURL=http%3A%2F%2Fwww. badoobook.com%2Fclips&em=1" type="application/x-shockwave-flash" allowScriptAccess="always" width="420" height="345" allowFullScreen="true"></embed></object>'
$regular = '';
$code = preg_replace($regular ,'$1' , $code);
echo $code;
在這段代碼中的VID ID是
值=
"
VID_ID =&
感謝幫助
你試過嗎? – piotrekkr 2012-03-24 21:07:49
我所面對的大事是<我認爲有一些特殊的事情在監管表達來閱讀它,我不知道它 – 2012-03-24 21:10:06