{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/69080688","id":69080688,"diff_hunk":"@@ -34,6 +34,8 @@ oppia.directive('oppiaNoninteractiveVideo', [\n \n           $scope.videoId = oppiaHtmlEscaper.escapedJsonToObj(\n             $attrs.videoIdWithValue);\n+          $scope.videoId = $scope.videoId.match(\n+            /([A-z]|[0-9]){11}/g);","path":"extensions/rich_text_components/Video/Video.js","position":5,"original_position":5,"commit_id":"44882913eca3bd1193e2e385be6844d4d8174bdb","original_commit_id":"44882913eca3bd1193e2e385be6844d4d8174bdb","user":{"login":"arun1595","id":7039523,"avatar_url":"https://avatars.githubusercontent.com/u/7039523?v=3","gravatar_id":"","url":"https://api.github.com/users/arun1595","html_url":"https://github.com/arun1595","followers_url":"https://api.github.com/users/arun1595/followers","following_url":"https://api.github.com/users/arun1595/following{/other_user}","gists_url":"https://api.github.com/users/arun1595/gists{/gist_id}","starred_url":"https://api.github.com/users/arun1595/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arun1595/subscriptions","organizations_url":"https://api.github.com/users/arun1595/orgs","repos_url":"https://api.github.com/users/arun1595/repos","events_url":"https://api.github.com/users/arun1595/events{/privacy}","received_events_url":"https://api.github.com/users/arun1595/received_events","type":"User","site_admin":false},"body":"I think your regex is missing some valid characters. The length of a youtube video is 11 characters and there's 64 possibilities for every character.\r\n- A-Z (26)\r\n- a-z (26)\r\n- - _(2)\r\nSee [here](http://stackoverflow.com/questions/6180138/whats-the-maximum-length-of-a-youtube-video-id) for more info\r\n\r\nAlso, you need to add the case-insensitive flag if you want to go with your current regex or you can make use of `\\w` which captures alphabetic characters, numerals and underscores. You might want to take care of hypens though.\r\n\r\nAnd match function always returns an array of the entire match and matches in captured groups if any.\r\nFor ref, read [this](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/match)\r\n","created_at":"2016-06-30T06:58:27Z","updated_at":"2016-06-30T06:58:27Z","html_url":"https://github.com/oppia/oppia/pull/1627#discussion_r69080688","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/1627","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/69080688"},"html":{"href":"https://github.com/oppia/oppia/pull/1627#discussion_r69080688"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1627"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/1627","id":63601256,"html_url":"https://github.com/oppia/oppia/pull/1627","diff_url":"https://github.com/oppia/oppia/pull/1627.diff","patch_url":"https://github.com/oppia/oppia/pull/1627.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/1627","number":1627,"state":"open","locked":false,"title":"Fix #1236: extract YouTube ID from URL","user":{"login":"whites2","id":16595263,"avatar_url":"https://avatars.githubusercontent.com/u/16595263?v=3","gravatar_id":"","url":"https://api.github.com/users/whites2","html_url":"https://github.com/whites2","followers_url":"https://api.github.com/users/whites2/followers","following_url":"https://api.github.com/users/whites2/following{/other_user}","gists_url":"https://api.github.com/users/whites2/gists{/gist_id}","starred_url":"https://api.github.com/users/whites2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whites2/subscriptions","organizations_url":"https://api.github.com/users/whites2/orgs","repos_url":"https://api.github.com/users/whites2/repos","events_url":"https://api.github.com/users/whites2/events{/privacy}","received_events_url":"https://api.github.com/users/whites2/received_events","type":"User","site_admin":false},"body":"Using regex, the first 11 alphanumeric characters in a row of $scope.vidoId are extracted.  Obviously this doesn't change anything in the case that the user supplies the ID, but when the user supplies an entire URL only the ID will be stored.  Fixes issue #1236 ","created_at":"2016-03-21T17:28:31Z","updated_at":"2016-06-30T06:58:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09da21a78b3429fd932d164e2c10a9a6a554124c","assignee":{"login":"jacobdavis11","id":13726796,"avatar_url":"https://avatars.githubusercontent.com/u/13726796?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobdavis11","html_url":"https://github.com/jacobdavis11","followers_url":"https://api.github.com/users/jacobdavis11/followers","following_url":"https://api.github.com/users/jacobdavis11/following{/other_user}","gists_url":"https://api.github.com/users/jacobdavis11/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobdavis11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobdavis11/subscriptions","organizations_url":"https://api.github.com/users/jacobdavis11/orgs","repos_url":"https://api.github.com/users/jacobdavis11/repos","events_url":"https://api.github.com/users/jacobdavis11/events{/privacy}","received_events_url":"https://api.github.com/users/jacobdavis11/received_events","type":"User","site_admin":false},"assignees":[{"login":"jacobdavis11","id":13726796,"avatar_url":"https://avatars.githubusercontent.com/u/13726796?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobdavis11","html_url":"https://github.com/jacobdavis11","followers_url":"https://api.github.com/users/jacobdavis11/followers","following_url":"https://api.github.com/users/jacobdavis11/following{/other_user}","gists_url":"https://api.github.com/users/jacobdavis11/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobdavis11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobdavis11/subscriptions","organizations_url":"https://api.github.com/users/jacobdavis11/orgs","repos_url":"https://api.github.com/users/jacobdavis11/repos","events_url":"https://api.github.com/users/jacobdavis11/events{/privacy}","received_events_url":"https://api.github.com/users/jacobdavis11/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/1627/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/1627/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/1627/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/44882913eca3bd1193e2e385be6844d4d8174bdb","head":{"label":"whites2:youtube-id-fix","ref":"youtube-id-fix","sha":"44882913eca3bd1193e2e385be6844d4d8174bdb","user":{"login":"whites2","id":16595263,"avatar_url":"https://avatars.githubusercontent.com/u/16595263?v=3","gravatar_id":"","url":"https://api.github.com/users/whites2","html_url":"https://github.com/whites2","followers_url":"https://api.github.com/users/whites2/followers","following_url":"https://api.github.com/users/whites2/following{/other_user}","gists_url":"https://api.github.com/users/whites2/gists{/gist_id}","starred_url":"https://api.github.com/users/whites2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whites2/subscriptions","organizations_url":"https://api.github.com/users/whites2/orgs","repos_url":"https://api.github.com/users/whites2/repos","events_url":"https://api.github.com/users/whites2/events{/privacy}","received_events_url":"https://api.github.com/users/whites2/received_events","type":"User","site_admin":false},"repo":{"id":51372392,"name":"oppia","full_name":"whites2/oppia","owner":{"login":"whites2","id":16595263,"avatar_url":"https://avatars.githubusercontent.com/u/16595263?v=3","gravatar_id":"","url":"https://api.github.com/users/whites2","html_url":"https://github.com/whites2","followers_url":"https://api.github.com/users/whites2/followers","following_url":"https://api.github.com/users/whites2/following{/other_user}","gists_url":"https://api.github.com/users/whites2/gists{/gist_id}","starred_url":"https://api.github.com/users/whites2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whites2/subscriptions","organizations_url":"https://api.github.com/users/whites2/orgs","repos_url":"https://api.github.com/users/whites2/repos","events_url":"https://api.github.com/users/whites2/events{/privacy}","received_events_url":"https://api.github.com/users/whites2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whites2/oppia","description":"Tool for collaboratively building intelligent tutors.","fork":true,"url":"https://api.github.com/repos/whites2/oppia","forks_url":"https://api.github.com/repos/whites2/oppia/forks","keys_url":"https://api.github.com/repos/whites2/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whites2/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whites2/oppia/teams","hooks_url":"https://api.github.com/repos/whites2/oppia/hooks","issue_events_url":"https://api.github.com/repos/whites2/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/whites2/oppia/events","assignees_url":"https://api.github.com/repos/whites2/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/whites2/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/whites2/oppia/tags","blobs_url":"https://api.github.com/repos/whites2/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whites2/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whites2/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/whites2/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whites2/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/whites2/oppia/languages","stargazers_url":"https://api.github.com/repos/whites2/oppia/stargazers","contributors_url":"https://api.github.com/repos/whites2/oppia/contributors","subscribers_url":"https://api.github.com/repos/whites2/oppia/subscribers","subscription_url":"https://api.github.com/repos/whites2/oppia/subscription","commits_url":"https://api.github.com/repos/whites2/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/whites2/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/whites2/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/whites2/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/whites2/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/whites2/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whites2/oppia/merges","archive_url":"https://api.github.com/repos/whites2/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whites2/oppia/downloads","issues_url":"https://api.github.com/repos/whites2/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/whites2/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/whites2/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/whites2/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whites2/oppia/labels{/name}","releases_url":"https://api.github.com/repos/whites2/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/whites2/oppia/deployments","created_at":"2016-02-09T14:35:51Z","updated_at":"2016-02-09T14:35:54Z","pushed_at":"2016-03-21T17:20:37Z","git_url":"git://github.com/whites2/oppia.git","ssh_url":"git@github.com:whites2/oppia.git","clone_url":"https://github.com/whites2/oppia.git","svn_url":"https://github.com/whites2/oppia","homepage":"https://www.oppia.org","size":42277,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"125bc0eb3ce6029a5d4c187654e993d1414d0fe5","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive lessons.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/oppia/oppia/deployments","created_at":"2015-08-14T00:16:14Z","updated_at":"2016-06-30T06:04:02Z","pushed_at":"2016-06-30T06:14:46Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":82111,"stargazers_count":139,"watchers_count":139,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":234,"mirror_url":null,"open_issues_count":359,"forks":234,"open_issues":359,"watchers":139,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1627"},"html":{"href":"https://github.com/oppia/oppia/pull/1627"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/1627"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/1627/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1627/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1627/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/44882913eca3bd1193e2e385be6844d4d8174bdb"}}}}
{"actor":{"display_login":"arun1595"}}