{"id":919,"date":"2016-12-26T17:09:57","date_gmt":"2016-12-26T17:09:57","guid":{"rendered":"http:\/\/zappysys.com\/blog\/?p=919"},"modified":"2018-03-12T14:42:52","modified_gmt":"2018-03-12T14:42:52","slug":"using-ssis-regex-parser-task-extracting-html-content","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/","title":{"rendered":"Using SSIS Regex Parser Task for Extracting HTML Content"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2974 alignleft\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png\" alt=\"\" width=\"100\" height=\"100\" \/><\/a>In this post you will learn how to use FREE <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-regex-parser-task\/\" target=\"_blank\" rel=\"noopener\">SSIS Regex Parser Task<\/a> along with <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\" target=\"_blank\" rel=\"noopener\">REST API Task<\/a> to extract HTML content in few clicks.<\/p>\n<p>Scenario<\/p>\n<p>Assume that you want to search certain keywords from Bing or google and want to know how many pages found for that keyword. Url for search would be something like http:\/\/www.bing.com\/search?q=regex where regex is our search word.<\/p>\n<p>When page is returned view source code of that page and you will find tag like below.<\/p>\n<pre class=\"lang:default decode:true\">&lt;span class=\"sb_count\" data-bm=\"4\"&gt;21,00,000 results&lt;\/span&gt;<\/pre>\n<p>What we want is number 21,00,000 using Regular expression pattern search.<\/p>\n<h2>Step-By-Step : Extract HTML Tag value using Regex Expression<\/h2>\n<ol>\n<li>Download and Install <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">SSIS PowerPack<\/a> (It includes FREE <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-regex-parser-task\/\" target=\"_blank\" rel=\"noopener\">SSIS Regex Parser Task<\/a> )<\/li>\n<li>Create new SSIS Package<\/li>\n<li>Drag ZS REST API Task on Control flow designer from SSIS Toolbox<\/li>\n<li>Double click to configure the task. Enter URL you like to fetch e.g. http:\/\/www.bing.com\/search?q=regex<\/li>\n<li>Click on Response Tab and check Save response option. Select Save to Variable. If needed create new variable.<\/li>\n<li>Click Test (Scroll at the bottom to see html content)<\/li>\n<li>Now drag ZS Regex Parser Task and connect with REST API Task<\/li>\n<li>Select Variable which will hold HTML text you like to parse.<\/li>\n<li>Enter following expression and map target to some Variable if you like to save extracted value. Below expression ends with {{0,1}} which means extract first match and 2nd group of that match (0 based Index). 2nd group of match will hold actual count of search result. If you omit {{x,y}} at the end then {{0,0}} is used.\n<pre class=\"lang:default decode:true\">\\&lt;span\\s*\\w*\\s*class=\"sb_count\"\\s*&gt;\\s*(?&lt;p2&gt;[0-9,.]*){{0,1}}\r\n<\/pre>\n<p>See below screenshot<\/p>\n<div id=\"attachment_920\" style=\"width: 710px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/12\/ssis-regex-expression-extract-html-tag-value.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-920\" class=\"wp-image-920\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/12\/ssis-regex-expression-extract-html-tag-value.png\" alt=\"SSIS Regex Parser Task - Extract HTML Tag Value using Regular Expression\" width=\"700\" height=\"461\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/12\/ssis-regex-expression-extract-html-tag-value.png 881w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/12\/ssis-regex-expression-extract-html-tag-value-300x198.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><p id=\"caption-attachment-920\" class=\"wp-caption-text\">SSIS Regex Parser Task &#8211; Extract HTML Tag Value using Regular Expression<\/p><\/div><\/li>\n<li>In the above step you can select Variable as Input or use placeholder in Direct string (e.g\u00a0 {{Use::varHtml}} )<\/li>\n<li>\u00a0You can also connect ZS Logging task to show extracted value<\/li>\n<\/ol>\n<p>Here is final flow.<\/p>\n<div id=\"attachment_921\" style=\"width: 700px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/12\/ssis-regex-parse-example-download-page-extract-html-tag-value.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-921\" class=\"size-full wp-image-921\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/12\/ssis-regex-parse-example-download-page-extract-html-tag-value.png\" alt=\"SSIS Regular expression parsing example\" width=\"690\" height=\"406\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/12\/ssis-regex-parse-example-download-page-extract-html-tag-value.png 690w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/12\/ssis-regex-parse-example-download-page-extract-html-tag-value-300x177.png 300w\" sizes=\"(max-width: 690px) 100vw, 690px\" \/><\/a><p id=\"caption-attachment-921\" class=\"wp-caption-text\">SSIS Regular expression parsing example<\/p><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this post you will learn how to use FREE SSIS Regex Parser Task along with REST API Task to extract HTML content in few clicks. Scenario Assume that you want to search certain keywords from Bing or google and want to know how many pages found for that keyword. Url for search would [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2974,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[133],"tags":[161,12,4,162,144],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Using SSIS Regex Parser Task for Extracting HTML Content | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"Learn how to download web page in SSIS and use FREE SSIS Regex Parser Task to extract HTML content in few clicks. Save HTML Tag value to variable.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Using SSIS Regex Parser Task for Extracting HTML Content | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"Learn how to download web page in SSIS and use FREE SSIS Regex Parser Task to extract HTML content in few clicks. Save HTML Tag value to variable.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ZappySys\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2016-12-26T17:09:57+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2018-03-12T14:42:52+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"100\" \/>\r\n\t<meta property=\"og:image:height\" content=\"100\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/zappysys\/\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/\",\"url\":\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/\",\"name\":\"Using SSIS Regex Parser Task for Extracting HTML Content | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png\",\"datePublished\":\"2016-12-26T17:09:57+00:00\",\"dateModified\":\"2018-03-12T14:42:52+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\"},\"description\":\"Learn how to download web page in SSIS and use FREE SSIS Regex Parser Task to extract HTML content in few clicks. Save HTML Tag value to variable.\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png\",\"width\":100,\"height\":100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using SSIS Regex Parser Task for Extracting HTML Content\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"sameAs\":[\"http:\/\/www.zappysys.com\/\",\"https:\/\/www.facebook.com\/ZappySys\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using SSIS Regex Parser Task for Extracting HTML Content | ZappySys Blog","description":"Learn how to download web page in SSIS and use FREE SSIS Regex Parser Task to extract HTML content in few clicks. Save HTML Tag value to variable.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/","og_locale":"en_US","og_type":"article","og_title":"Using SSIS Regex Parser Task for Extracting HTML Content | ZappySys Blog","og_description":"Learn how to download web page in SSIS and use FREE SSIS Regex Parser Task to extract HTML content in few clicks. Save HTML Tag value to variable.","og_url":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/","og_site_name":"ZappySys Blog","article_author":"https:\/\/www.facebook.com\/ZappySys\/","article_published_time":"2016-12-26T17:09:57+00:00","article_modified_time":"2018-03-12T14:42:52+00:00","og_image":[{"width":100,"height":100,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/zappysys\/","twitter_misc":{"Written by":"ZappySys","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/","url":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/","name":"Using SSIS Regex Parser Task for Extracting HTML Content | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png","datePublished":"2016-12-26T17:09:57+00:00","dateModified":"2018-03-12T14:42:52+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82"},"description":"Learn how to download web page in SSIS and use FREE SSIS Regex Parser Task to extract HTML content in few clicks. Save HTML Tag value to variable.","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png","width":100,"height":100},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/using-ssis-regex-parser-task-extracting-html-content\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using SSIS Regex Parser Task for Extracting HTML Content"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","caption":"ZappySys"},"sameAs":["http:\/\/www.zappysys.com\/","https:\/\/www.facebook.com\/ZappySys\/","https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/"],"url":"https:\/\/zappysys.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/919"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=919"}],"version-history":[{"count":3,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/919\/revisions"}],"predecessor-version":[{"id":10121,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/919\/revisions\/10121"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/2974"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}