<object width="480" height="385">
<param name="movie" value="http://www.youtube.com/v/_b9_WUcxF1I?fs=1&hl=en_US"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/_b9_WUcxF1I?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed>
</object>
使用此段落,我只想要 http://www.youtube.com/v/_b9_WUcxF1I?fs=1& (网址)。如何在javascript中使用常规expreesion拆分或获取值。
答案 0 :(得分:0)
这是给你的一个:
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;