SSIS Regex Parser Task
PreviousNext

SSIS Regex Parser Task can parse any input text from SSIS variable or file using regular expression language. Parsed data can be saved to SSIS variable.

Download SSIS PowerPack

Content

Video Tutorial

Coming soon...

Step-By-Step

In this tutorial you will learn how to parse input text from variables or file using ZS Regular Expression Task.
  1. Firstly, You need to Download and Install SSIS ZappySys PowerPack.
  2. Once you finished first step, Open Visual Studio and Create New SSIS Package Project.
  3. In Visual Studio Project, drag and drop the SSIS ZS Regular Expression Parser Task in the design pane from SSIS Toolbox.
    SSIS Regex Parser Task - Drag and Drop
  4. We need Variables to store values and File Connection for source.

How to create Variable and File Connection.

  1. Let's Create Variables, In Visual Studio Right Click on Design Panel, Select Variables.
    SFTP Task Operations - Create Variable
  2. Create three variables varFirstEmail, varLastEmail and varPhone with String DataType.
    SSIS Regex Parser Task - Variable
  3. Now, lets create File Connection.
  4. Let's, Right click on Connection Managers Panel to Create File Connection, so you can use Source Path, and Context Menu will appear, Select New Connection from the Context Menu.
    SSIS Regex Parser Task - File Connection
  5. Click on OK button to save File Connection configure setting UI.

How to use ZS Regular Expression Parser Task.

  1. Double click on ZS Regular Expression Parser Task for configure it.
  2. Now, Extract Email, Phone Number from text using Regular Expression with just few clicks. Enter following Expression and map Target to some Variable if you like to save extracted value.
    SSIS Regex Parser Task - Extract email,phone from text using Regular expression
  3. Click on OK button to save Regular Expression Parser Task configure setting UI.
  4. In the above step you can Select Variable as Input or use placeholder in Direct string (e.g {{Use::varHtml}}
  5. You can also connect ZS Logging Task to show extracted value.
  6. That's all, Just Execute Regular Expression Parser Task and Check Execution Results.
  7. Moreover, Tools for write and test Regex.
    The best tool we've found to write and test Regex is Regex Hero (will require IE with SilverLight if you want to use it online, in the browser)
    Another great site for Regex testing is https://regex101.com (Works in any browser unlike previous one)
    
    http://www.regexr.com/
    http://www.regexlib.com/
    http://www.regular-expressions.info/
    

Properties

Property Name Description
SourceAccessMode Access mode for source data you want to parse.

Available Options (Use numeric value listed in bracket if you have to define expression on this property (for dynamic behavior).

Option Description
Direct [0] Direct
Variable [1] Variable
Connection [2] Connection
SourceVariable Variable which holds input string
SourceConnection Connection which holds input File path
SourceDirectValue Direct input text
TargetSettings Target settings for each extracted value from input text
LoggingMode

Available Options (Use numeric value listed in bracket if you have to define expression on this property (for dynamic behavior).

Option Description
Normal [0] Normal
Medium [1] Medium
Detailed [2] Detailed
Debugging [3] Debugging
PrefixTimestamp When you enable this property it will prefix timestamp before Log messages.

Setting UI

SSIS Regex Parser Task - Setting UI
SSIS Regex Parser Task - Setting UI

See Also

References

Articles / Tutorials

Click here to see all articles for [SSIS Regex Parser Task] category
Using Regular Expressions in SSIS

Using Regular Expressions in SSIS

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 purpose we will use FREE SSIS Regex Parser Task to parse and […]


Using SSIS Regex Parser Task for Extracting HTML Content

Using SSIS Regex Parser Task for Extracting HTML Content

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 […]



Copyrights reserved. ZappySys LLC.