{"id":2858,"date":"2018-03-07T17:38:24","date_gmt":"2018-03-07T17:38:24","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=2858"},"modified":"2023-09-13T17:09:53","modified_gmt":"2023-09-13T17:09:53","slug":"using-regular-expressions-in-ssis","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/","title":{"rendered":"Using Regular Expressions in SSIS"},"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=\" wp-image-2974 alignleft\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png\" alt=\"\" width=\"114\" height=\"114\" \/><\/a>In this short article, you will learn how to write Regular expressions in SSIS (i.e. Regex) and what tool to use to test them. You will also find helpful resources on how to write more sophisticated expressions and learn more about them. For demo purposes, we will use <strong>FREE<\/strong>\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-regex-parser-task\/\" target=\"_blank\" rel=\"noopener\">SSIS Regex Parser Task<\/a>\u00a0to parse and extract the text using Regex.<\/p>\n<p>&nbsp;<\/p>\n<p>You can use Regular expressions in several SSIS PowerPack connectors:<\/p>\n<ul>\n<li><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-regex-parser-task\/\" target=\"_blank\" rel=\"noopener\">SSIS Regex Parser Task (FREE)<\/a>,<\/li>\n<li><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-azure-blob-storage-task\/\" target=\"_blank\" rel=\"noopener\">Azure Blob Storage Task<\/a>,<\/li>\n<li><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-file-system-task-advanced\/\" target=\"_blank\" rel=\"noopener\">Advanced File System Task<\/a>,<\/li>\n<li><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-amazon-s3-task\/\" target=\"_blank\" rel=\"noopener\">Amazon S3 Storage Task<\/a> and others.<\/li>\n<\/ul>\n<h2>Writing Regular Expressions in SSIS<\/h2>\n<p>Based on the SSIS component you use it will include the filename in filtering options or match the text: See below Syntax to write Regex in ZappySys tools. We support additional construct {{X, Y}} at the end of Regex to control two parameters. This additional construct is useful for data extracted from matching regex. If you want to Test patterns and not worry about data extraction then no need to use last {{<span class=\"lang:default decode:true crayon-inline \">Occurance_Index<\/span>, <span class=\"lang:default decode:true crayon-inline \">Group_Index_Or_Name<\/span>}}<\/p>\n<p><strong>Syntax:<\/strong><br \/>\n<span class=\"lang:default decode:true crayon-inline\">&lt;your Regular Expression&gt;[{{Occurance_Index|*[,Group_Index_Or_Name]}}]<\/span><\/p>\n<p><strong>Where:<\/strong><br \/>\n<span class=\"lang:default decode:true crayon-inline \">Occurance_Index<\/span>=Occurrence index you want to extract (X=0 means the first match) and * means all matches. Use a minus sign to get an occurrence from reverse (e.g. {{-0}} returns the last match)<br \/>\n<span class=\"lang:default decode:true crayon-inline \">Group_Index_Or_Name<\/span>=Group index\/name within your search pattern (Groups are indicated by parentheses in regular expression, Y=0 means first group). If you named your group in the pattern then you can use the Group name. To use Group Name you must use the new version (the old version doesn&#8217;t support this)<\/p>\n<p><strong>How to name a group?<\/strong><\/p>\n<p>E.g. (\\w+)@(<strong>?&lt;domain&gt;<\/strong>\\w+.com)<\/p>\n<p><strong>How to use the group name in the match extract?<\/strong><\/p>\n<p>E.g. (\\w+)@(<strong>?&lt;domain&gt;<\/strong>\\w+.com){{0,<strong>domain<\/strong>}}<\/p>\n<p><strong>Example Input:<\/strong><\/p>\n<p>Let&#8217;s assume we have the following input text. We will test various Expressions.<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">Customer =&gt; AAA\r\nEmail =&gt; aaa@google.com\r\nPhone =&gt; 101-222-3333\r\n========\r\nCustomer =&gt; BBB\r\nEmail =&gt; bbb@yahoo.com\r\nPhone =&gt; 102-222-3333\r\n========\r\nCustomer =&gt; CCC\r\nEmail =&gt; ccc@hotmail.com\r\nPhone =&gt; 103-222-3333\r\n========\r\nCustomer =&gt; DDD\r\nEmail =&gt; ddd@outlook.com\r\nPhone =&gt; 104-222-3333\r\n<\/pre>\n<p><strong>Sample Regex Expressions<\/strong><\/p>\n<div class=\"su-table su-table-alternate\">\n<table style=\"border-collapse: collapse;width: 100%;height: 332px\" border=\"1\">\n<tbody>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\"><strong>Expression<\/strong><\/td>\n<td style=\"width: 50%;height: 22px\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 46px\">\n<td style=\"width: 50%;height: 46px\">(?s).*<\/td>\n<td style=\"width: 50%;height: 46px\">Match anything including new lines. To match anything without new line just use <span class=\"lang:default highlight:0 decode:true crayon-inline \">(.*)<\/span><\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">\\w+([-+.&#8217;]\\w+)*@(?&lt;domain&gt;\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*)<\/td>\n<td style=\"width: 50%;height: 22px\">Get first email id from text ({{0}} is omitted from end because {{0}} id default)<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">\\w+([-+.&#8217;]\\w+)*@(?&lt;domain&gt;\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*){{-0}}<\/td>\n<td style=\"width: 50%;height: 22px\">Get last email id from text<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">\\w+([-+.&#8217;]\\w+)*@(?&lt;domain&gt;\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*){{*}}<\/td>\n<td style=\"width: 50%;height: 22px\">Get all email addresses (separate them with new line). When you suffix Regular expression with {{*}} it will return all matches.<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">\\w+([-+.&#8217;]\\w+)*@(?&lt;domain&gt;\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*){{2}}<\/td>\n<td style=\"width: 50%;height: 22px\">Get third email id from text (i.e. ends with {{X}} where X is occurrence index starting from 0)<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">\\w+([-+.&#8217;]\\w+)*@(?&lt;domain&gt;\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*){{0,2}}<\/td>\n<td style=\"width: 50%;height: 22px\">Get first email pattern match (i.e. Index=0) and extract domain (i.e. 2nd group). Index starting from 0 for occurrence and group<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">(\\d*)-(\\d*)-(\\d*)<\/td>\n<td style=\"width: 50%;height: 22px\">Get first phone number from text (If you don&#8217;t include {{X,Y}} at the end then it will be always [0,0])<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">^((?!demo|test).)*$<\/td>\n<td style=\"width: 50%;height: 22px\">Match whole input text if it does not contain words like demo or test. If word found then No Match<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">&lt;tag&gt;((.|\\n)*?)&lt;\/tag&gt;{{0,1}}<\/td>\n<td style=\"width: 50%;height: 22px\">Extract anything between &lt;tag&gt;&#8230;&lt;\/tag&gt; (Include new line char i.e. \\n)<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">&lt;tag&gt;(.*)&lt;\/tag&gt;{{0,1}}<\/td>\n<td style=\"width: 50%;height: 22px\">Extract anything between &lt;tag&gt;&#8230;&lt;\/tag&gt; (Exclude new line char i.e. \\n)<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">&lt;!\\[CDATA\\[((.|\\n)*?)\\]\\]\\&gt;{{0,1}}<\/td>\n<td style=\"width: 50%;height: 22px\">Extract content from CData section of XML Data (This can be CSV, JSON or nested XML )<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 50%;height: 22px\">^$<\/td>\n<td style=\"width: 50%;height: 22px\">Match blank string<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>More Regular Expression Examples<\/h2>\n<div class=\"su-table su-table-alternate\">\n<table>\n<tbody>\n<tr>\n<td style=\"width: 196px\"><strong>Input Text<\/strong><\/td>\n<td style=\"width: 223px\"><strong>Regex<\/strong><\/td>\n<td style=\"width: 163px\"><strong>Matched text<\/strong><\/td>\n<td style=\"width: 752px\"><strong>Comment<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\">&lt;row id=&#8221;123&#8243; process=&#8221;Y&#8221;&gt;<\/td>\n<td style=\"width: 223px\">id=&#8221;([^&#8221;]*)&#8221;{{0,1}}<\/td>\n<td style=\"width: 163px\"><strong>123<\/strong><\/td>\n<td style=\"width: 752px\">This expression shows how to extract group value (i.e. {{0,1}} &#8211; first match and 2nd group ). It\u00a0extracts text between double quotes using <strong>[^&#8221;]*<\/strong>\u00a0pattern , match anything until double quote is found.\u00a0 {{0,1}} syntax is ZappySys specific so it may not work with other Regex engines.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\">&lt;data&gt;123&lt;\/data&gt;<\/td>\n<td style=\"width: 223px\">&lt;data&gt;([^&lt;]*)&lt;\\\/data&gt;{{0,1}}<\/td>\n<td style=\"width: 163px\"><strong>123<\/strong><\/td>\n<td style=\"width: 752px\">This expression shows how to extract group value (i.e. {{0,1}} &#8211; first match and 2nd group ). It\u00a0extracts text between double quotes using <strong>[^&lt;]*<\/strong>\u00a0pattern , match anything until <strong>&lt;<\/strong>\u00a0 is found.\u00a0 {{0,1}} syntax is ZappySys specific so it may not work with other Regex engines.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\" valign=\"top\">File_20180930_source.txt<\/td>\n<td style=\"width: 223px\" valign=\"top\">File<\/td>\n<td style=\"width: 163px\" valign=\"top\"><strong>File<\/strong><\/td>\n<td style=\"width: 752px\" valign=\"top\">Will match text\/filename that has &#8220;File&#8221; keyword in it.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\" valign=\"top\">File_20180930_SOURCE.dat<br \/>\nFile_20180930_source.dat<\/td>\n<td style=\"width: 223px\" valign=\"top\">source|SOURCE<\/td>\n<td style=\"width: 163px\" valign=\"top\"><strong>SOURCE<\/strong>\u00a0and <strong>source<\/strong><\/td>\n<td style=\"width: 752px\" valign=\"top\">Will match text\/filenames that contain either &#8220;source&#8221; <strong>or<\/strong> &#8220;SOURCE&#8221; keyword.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\" valign=\"top\">File_20180930_source.txt<\/td>\n<td style=\"width: 223px\" valign=\"top\">File.+source<\/td>\n<td style=\"width: 163px\" valign=\"top\"><strong>File_20180930_source<\/strong><\/td>\n<td style=\"width: 752px\" valign=\"top\">Will match text\/filename that contains keyword that starts with &#8220;File&#8221; <strong>and<\/strong> ends with &#8220;source&#8221;.<br \/>\nBasically, you can use this pattern if you want to match two keywords in the text that appear in particular order.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\" valign=\"top\">File_20180930_source.txt<br \/>\nFile_20180830_source.dat<\/td>\n<td style=\"width: 223px\" valign=\"top\">\\.txt$|\\.dat$<\/td>\n<td style=\"width: 163px\" valign=\"top\"><strong>.txt<\/strong> and <strong>.dat<\/strong><\/td>\n<td style=\"width: 752px\" valign=\"top\">Will match text\/all filenames that end with &#8220;.txt&#8221; <strong>or<\/strong> &#8220;.dat&#8221;.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\" valign=\"top\">File_20180930_source.txt<br \/>\nfile_20190102_source.txt<\/td>\n<td style=\"width: 223px\" valign=\"top\">^(F|f)ile_\\d{8}<\/td>\n<td style=\"width: 163px\" valign=\"top\"><strong>File_20180930<\/strong><br \/>\n<strong>file_20190102<\/strong><\/td>\n<td style=\"width: 752px\" valign=\"top\">Will match text\/filename that starts with &#8220;File_&#8221; <strong>or<\/strong> &#8220;file_&#8221; <strong>and<\/strong> then followed by 8 digits.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\" valign=\"top\">File_20180930_source.txt<br \/>\nFile_20190101_none.txt<\/td>\n<td style=\"width: 223px\" valign=\"top\">(.+)_(.+)_(.+){{0,2}}<\/td>\n<td style=\"width: 163px\" valign=\"top\"><strong>20180930<\/strong><\/td>\n<td style=\"width: 752px\" valign=\"top\">Will match text that has three groups of text strings, separated by &#8220;_&#8221;.<br \/>\nNon-Regex {{0,2}} notation will bring back second group (index &#8220;2&#8221;) of first match (index &#8220;0&#8221;).<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\">File_20180930_source.txt<br \/>\nFile_20190101_none.txt<\/td>\n<td style=\"width: 223px\">(.+)_(.+)_(.+){{1,2}}<\/td>\n<td style=\"width: 163px\"><strong>20190101<\/strong><\/td>\n<td style=\"width: 752px\">Will match text that has three groups of text strings, separated by &#8220;_&#8221;.<br \/>\nNon-Regex {{1,2}} notation will bring back second group (index &#8220;2&#8221;) of second match (index &#8220;1&#8221;).<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\">File_20180930_source.txt<br \/>\nFile_20190101_none.txt<\/td>\n<td style=\"width: 223px\">(.+)_(.+)_(.+){{*,2}}<\/td>\n<td style=\"width: 163px\"><strong>20180930<br \/>\n20190101<br \/>\n<\/strong><\/td>\n<td style=\"width: 752px\">Will match text that has three groups of text strings, separated by &#8220;_&#8221;.<br \/>\nNon-Regex {{*,2}} notation will bring back second group (index &#8220;2&#8221;) of all matches (index &#8220;*&#8221;). Returned matches are separated by \\r\\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\">&lt;html&gt;<br \/>\n&lt;img src=&#8221;\/img-1.png&#8221; \/&gt;<br \/>\n&lt;img src=&#8221;\/img-2.png&#8221; \/&gt;<br \/>\n&lt;img src=&#8221;\/img-3.png&#8221; \/&gt;<br \/>\n<span style=\"font-family: inherit;font-size: inherit\">&lt;\/html&gt;<\/span><\/td>\n<td style=\"width: 223px\">&lt;img[^&gt;]+src=&#8221;([^&#8221;&gt;]+)&#8221;{{*,1}}<\/td>\n<td style=\"width: 163px\"><strong>\/img-1.png<br \/>\n\/img-2.png<br \/>\n\/img-3.png<br \/>\n<\/strong><\/td>\n<td style=\"width: 752px\">Will return image URLs from HTML content. We used {{*,1}} means it will pull all occurrences and for each match it will extract first group (which is just src attribute value).<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\">null<\/td>\n<td style=\"width: 223px\">^((?!null\\b).)*$<\/td>\n<td style=\"width: 163px\"><strong>&lt;blank&gt;<\/strong><\/td>\n<td style=\"width: 752px\">Returns blank if null word found (match all except null)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\">black white<\/td>\n<td style=\"width: 223px\">^((?!red|blue|orange).)*$<\/td>\n<td style=\"width: 163px\"><strong>black white<\/strong><\/td>\n<td style=\"width: 752px\">Returns full string as is if any of those 3 words (i.e. red, blue, orange) not found anywhere in the string<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 196px\">black white red<\/td>\n<td style=\"width: 223px\">^((?!red|blue|orange).)*$<\/td>\n<td style=\"width: 163px\"><strong>&lt;blank&gt;<\/strong><\/td>\n<td style=\"width: 752px\">Returns blank if\u00a0any of those 3 words (i.e. red, blue, orange) found anywhere in the string<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>Regex Examples (Using SSIS Regular Expression Parser Task)<\/h2>\n<p>Here is an example how Regex <span class=\"lang:default highlight:0 decode:true crayon-inline \">(.+)_(.+)_(.+){{1,2}}<\/span>\u00a0works in <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-regex-parser-task\/\" target=\"_blank\" rel=\"noopener\">Regular Expression Parser Task (FREE)<\/a>:<\/p>\n<div id=\"attachment_2978\" style=\"width: 742px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_parser_task.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2978\" class=\"wp-image-2978 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_parser_task-e1520866478970.png\" alt=\"Using Regular Expressions in SSIS Regex Parser Task (Extract Groups)\" width=\"732\" height=\"612\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_parser_task-e1520866478970.png 732w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_parser_task-e1520866478970-300x251.png 300w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/a><p id=\"caption-attachment-2978\" class=\"wp-caption-text\">Using Regular Expressions in SSIS Regex Parser Task (Extract Groups)<\/p><\/div>\n<h2>Using Groups \/ Occurrence Index<\/h2>\n<p>Some tasks like\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-regex-parser-task\/\" target=\"_blank\" rel=\"noopener\">SSIS Regex Parser Task (FREE)<\/a>\u00a0supports extracting value from specific occurrence and specific part of matched pattern using special syntax at the end of your pattern (see below).<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">Your Regex Pattern Here{{OccuranceIndex,GroupIndex}}<\/pre>\n<p><strong>Where :<\/strong><br \/>\nOccuranceIndex is 0 based (0=extract first occurrence)<br \/>\nGroupIndex is 0 based (0=extract first matching group from pattern. First group is always entire text. )<\/p>\n<p>See above screenshot in previous section for example.<\/p>\n<h2>Tools<\/h2>\n<p>The best tool we&#8217;ve found to write and test Regex is <a href=\"http:\/\/regexhero.net\/tester\/\" target=\"_blank\" rel=\"noopener\">Regex Hero<\/a>\u00a0(will require IE with Silverlight if you want to use it online, in the browser):<\/p>\n<p>Another great site for Regex testing is\u00a0<a href=\"https:\/\/regex101.com\" target=\"_blank\" rel=\"noopener\">https:\/\/regex101.com<\/a>\u00a0(Works in any browser unlike previous one)<\/p>\n<p>and few more sites as below<\/p>\n<p><a href=\"http:\/\/www.regexr.com\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.regexr.com\/<\/a><br \/>\n<a href=\"http:\/\/www.regexlib.com\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.regexlib.com\/<\/a><br \/>\n<a href=\"http:\/\/www.regular-expressions.info\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.regular-expressions.info\/<\/a><\/p>\n<p><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_task_using_regex_hero.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2972\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_task_using_regex_hero.png\" alt=\"\" width=\"802\" height=\"483\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_task_using_regex_hero.png 802w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_task_using_regex_hero-300x181.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis_powerpack_regular_expression_task_using_regex_hero-768x463.png 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<h2>Resources<\/h2>\n<p><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/Regular-expressions-quick-reference.pdf\">Regular Expressions cheat-sheet to hang on the wall<\/a><\/p>\n<p><a href=\"http:\/\/www.rexegg.com\/regex-quickstart.html\" target=\"_blank\" rel=\"noopener\">Regular Expressions quick reference<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this short article, you will learn how to write Regular expressions in SSIS (i.e. Regex) and what tool to use to test them. You will also find helpful resources on how to write more sophisticated expressions and learn more about them. For demo purposes, we will use FREE\u00a0SSIS Regex Parser Task\u00a0to parse and [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":2974,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47,181,182,133,138,9,11,122],"tags":[161,95],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Using Regular Expressions in SSIS | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"Learn how to parse and write regular expressions in SSIS (i.e. Regex) and what tool to use to test them. Process file path, extract from HTML and more.\" \/>\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-regular-expressions-in-ssis\/\" \/>\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 Regular Expressions in SSIS | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"Learn how to parse and write regular expressions in SSIS (i.e. Regex) and what tool to use to test them. Process file path, extract from HTML and more.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2018-03-07T17:38:24+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2023-09-13T17:09:53+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: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=\"7 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-regular-expressions-in-ssis\/\",\"url\":\"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/\",\"name\":\"Using Regular Expressions in SSIS | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png\",\"datePublished\":\"2018-03-07T17:38:24+00:00\",\"dateModified\":\"2023-09-13T17:09:53+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c146068d4cb053724ae5ce85759c3ada\"},\"description\":\"Learn how to parse and write regular expressions in SSIS (i.e. Regex) and what tool to use to test them. Process file path, extract from HTML and more.\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/#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-regular-expressions-in-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Regular Expressions in SSIS\"}]},{\"@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\/c146068d4cb053724ae5ce85759c3ada\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/60165d46d0b33aefb91df61a22b0e1f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/60165d46d0b33aefb91df61a22b0e1f4?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"url\":\"https:\/\/zappysys.com\/blog\/author\/gliaskus\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Regular Expressions in SSIS | ZappySys Blog","description":"Learn how to parse and write regular expressions in SSIS (i.e. Regex) and what tool to use to test them. Process file path, extract from HTML and more.","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-regular-expressions-in-ssis\/","og_locale":"en_US","og_type":"article","og_title":"Using Regular Expressions in SSIS | ZappySys Blog","og_description":"Learn how to parse and write regular expressions in SSIS (i.e. Regex) and what tool to use to test them. Process file path, extract from HTML and more.","og_url":"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/","og_site_name":"ZappySys Blog","article_published_time":"2018-03-07T17:38:24+00:00","article_modified_time":"2023-09-13T17:09:53+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_misc":{"Written by":"ZappySys","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/","url":"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/","name":"Using Regular Expressions in SSIS | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/03\/ssis-regex-parser-task.png","datePublished":"2018-03-07T17:38:24+00:00","dateModified":"2023-09-13T17:09:53+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c146068d4cb053724ae5ce85759c3ada"},"description":"Learn how to parse and write regular expressions in SSIS (i.e. Regex) and what tool to use to test them. Process file path, extract from HTML and more.","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/using-regular-expressions-in-ssis\/#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-regular-expressions-in-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using Regular Expressions in SSIS"}]},{"@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\/c146068d4cb053724ae5ce85759c3ada","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/60165d46d0b33aefb91df61a22b0e1f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/60165d46d0b33aefb91df61a22b0e1f4?s=96&d=mm&r=g","caption":"ZappySys"},"url":"https:\/\/zappysys.com\/blog\/author\/gliaskus\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/2858"}],"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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=2858"}],"version-history":[{"count":33,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/2858\/revisions"}],"predecessor-version":[{"id":10436,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/2858\/revisions\/10436"}],"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=2858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=2858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=2858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}