Link to home
Start Free TrialLog in
Avatar of Coast Line
Coast LineFlag for Canada

asked on

regex hrlp required for extracting ID from few video services

Hi,

I am using couple of video services to diplay the videos to the users, now i have written some static code which will just fetch the id of the video url and play it in my video defined tag..

I am looking for regex for dailymotion, google video, livevideo, myspace, vimeo to extract the ID and give it to me, so i can use it

now there are few things, there is no one static url which can be used, it has different links to use the same id, so regex is becoming difficult to handle.

Like for vimeo i am using this code:

http://www.vimeo.com/moogaloop.swf?clip_id={Just need the ID to play it}
http://video.google.com.au/videoplay?docid=
http://livevideo.com/flvplayer/embed/
http://www.livevideo.com/flvplayer/embed/
http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=
http://www.dailymotion.com/swf/

Open in new window


the above is code which is i am using with the embed tag to play the videos.
ASKER CERTIFIED SOLUTION
Avatar of Pravin Asar
Pravin Asar
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Coast Line

ASKER

does that work for all or the specific ones
Should work.

I noticed following url have no query parameters

http://livevideo.com/flvplayer/embed/
http://www.livevideo.com/flvplayer/embed/
http://www.dailymotion.com/swf/


So I do not know, how you will be able to get the video source file name
working on it