{"id":1961,"date":"2016-02-23T14:59:12","date_gmt":"2016-02-23T19:59:12","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/?p=1961"},"modified":"2016-02-23T15:01:35","modified_gmt":"2016-02-23T20:01:35","slug":"using-matlab-regular-expressions-to-find-patterns-in-urls-on-our-website","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2016\/02\/23\/using-matlab-regular-expressions-to-find-patterns-in-urls-on-our-website\/","title":{"rendered":"Using MATLAB Regular Expressions to Find Patterns in URLs on Our Website"},"content":{"rendered":"<p>I want to count the number of different types of pages on our website (e.g. file exchange posts, videos, MATLAB Answers). Now, I can easily get these numbers from our internal systems but I want to determine them by looking at the website itself. This will let me create tests that verify there has not been a problem in the publishing of content.<\/p>\n<p>I already use a utility that crawls part of our website and tells me the URLs of the approximately 300,000 pages (I incorrectly say &#8220;300&#8221; in the video). I just need to analyze this list and look for patterns. Here is a video of me (using\u00a0the <a title=\"code-along\" href=\"https:\/\/blogs.mathworks.com\/videos\/2015\/10\/29\/matlab-code-along-videos\/\">code-along style<\/a>) trying to work through this problem.<\/p>\n<p>Remember, videos in this style are unedited real-time development. This one is about an hour long, so feel free to skip around to parts that interest you. There is a table of contents containing a small number of chapter points.<\/p>\n<p>I make <em>multiple<\/em> mistakes and incorrect assumptions as I go along. See if you can notice them before I do.   <\/p>\n<p><div class=\"row\"><div class=\"col-xs-12 containing-block\"><div class=\"bc-outer-container add_margin_20\"><videoplayer><div class=\"video-js-container\"><video data-video-id=\"4744893290001\" data-video-category=\"blog\" data-autostart=\"false\" data-account=\"62009828001\" data-omniture-account=\"mathwgbl\" data-player=\"rJ9XCz2Sx\" data-embed=\"default\" id=\"mathworks-brightcove-player\" class=\"video-js\" controls><\/video><script src=\"\/\/players.brightcove.net\/62009828001\/rJ9XCz2Sx_default\/index.min.js\"><\/script><script>if (typeof(playerLoaded) === 'undefined') {var playerLoaded = false;}(function isVideojsDefined() {if (typeof(videojs) !== 'undefined') {videojs(\"mathworks-brightcove-player\").on('loadedmetadata', function() {playerLoaded = true;});} else {setTimeout(isVideojsDefined, 10);}})();<\/script><\/div><\/videoplayer><\/div><\/div><\/div><\/p>\n<p>Play the video in full screen mode for a better viewing experience.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2016\/02\/23\/using-matlab-regular-expressions-to-find-patterns-in-urls-on-our-website\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/96133302-5710-49ef-84d4-e333e37f8823\/33d749bb-8be5-43d0-a75d-d3a8c77eca32\/1280x720\/match\/image.jpg\" onError=\"this.style.display ='none';\"\/><\/p>\n<div class=\"overlay_container\">\n      <span class=\"icon-video icon_color_null\"><time class=\"video_length\">66:41<\/time><\/span>\n      <\/div>\n<p>      <\/a><\/div>\n<p>I want to count the number of different types of pages on our website (e.g. file exchange posts, videos, MATLAB Answers). Now, I can easily get these numbers from our internal systems but I want to&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2016\/02\/23\/using-matlab-regular-expressions-to-find-patterns-in-urls-on-our-website\/\">read more >><\/a><\/p>\n","protected":false},"author":133,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[27,4],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/1961"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/users\/133"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/comments?post=1961"}],"version-history":[{"count":28,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/1961\/revisions"}],"predecessor-version":[{"id":2015,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/1961\/revisions\/2015"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=1961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=1961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=1961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}