How to Parse Dailymotion Video Url in javascript-Collection of common programming errors

I want to parse Dailymotion video url to get video id in javascript, like below:

video id: “x44lvd”

i think i need regex string to get a video id for all dailymotion video url combinations.

i found url parser regex for YouTube links, its working well like below:

var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
    var match = url.match(regExp);
    var videoID = "";
    if (match && match[7].length == 11){
        videoID = match[7];
    }else
       alert('video not found');

can anybody please give me some advice about dailymotion?