{"id":3327,"date":"2014-03-23T02:20:38","date_gmt":"2014-03-23T02:20:38","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/how-to-parse-dailymotion-video-url-in-javascript-collection-of-common-programming-errors-2\/"},"modified":"2014-03-23T02:20:38","modified_gmt":"2014-03-23T02:20:38","slug":"how-to-parse-dailymotion-video-url-in-javascript-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/how-to-parse-dailymotion-video-url-in-javascript-collection-of-common-programming-errors-2\/","title":{"rendered":"How to Parse Dailymotion Video Url in javascript-Collection of common programming errors"},"content":{"rendered":"<p>I want to parse Dailymotion video url to get video id in javascript, like below:<\/p>\n<p><iframe loading=\"lazy\" title=\"Rates of Exchange - Like a Renegade\" frameborder=\"0\" width=\"500\" height=\"375\" src=\"https:\/\/geo.dailymotion.com\/player.html?video=x44lvd&#038;\" allowfullscreen allow=\"autoplay; fullscreen; picture-in-picture; web-share\"><\/iframe><\/p>\n<p>video id: &#8220;x44lvd&#8221;<\/p>\n<p>i think i need regex string to get a video id for all dailymotion video url combinations.<\/p>\n<p>i found url parser regex for YouTube links, its working well like below:<\/p>\n<pre><code>var regExp = \/^.*((youtu.be\\\/)|(v\\\/)|(\\\/u\\\/\\w\\\/)|(embed\\\/)|(watch\\?))\\??v?=?([^#\\&amp;\\?]*).*\/;\n    var match = url.match(regExp);\n    var videoID = \"\";\n    if (match &amp;&amp; match[7].length == 11){\n        videoID = match[7];\n    }else\n       alert('video not found');\n<\/code><\/pre>\n<p>can anybody please give me some advice about dailymotion?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I want to parse Dailymotion video url to get video id in javascript, like below: video id: &#8220;x44lvd&#8221; 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?=?([^#\\&amp;\\?]*).*\/; var match = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3327","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3327"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3327\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}