How to split youtube video ID?
src="http://www.youtube.com/v/R5zKIOTvfwQ?version=3"
and
src="http://www.开发者_开发问答youtube.com/v/R5zKIOTvfwQ"
How can I get the video ID alone from this src?
Is there any predefined option available for that?
The video ID is the string which is after the v/ and before the ? In your case R5zKIOTvfwQ. If you are looking for an automatic way to retrieve it, try this regex:
/v\/(.*)[\?$]/
精彩评论