Assign Line on Regex Match : Getting Compiler Error 'Option Strict On Disallows implicit Conversion'

Hello there,
I am trying to design a CSV Validation for a Raw CSV file by reading it line by line and then validating each line if the lines have specified number of CSV fields.

However, Assign activity is not working, this is what I have done:

System.Text.RegularExpressions.Regex matched_line = System.Text.RegularExpressions.Regex.Match(strLine, strPattern)

It is throwing Compile time error: Option Strict On Disallows implicit Conversions from Object to String.

Please help me with this. (I am referring this MSDN arcticle)

Here is the Screenshot:

Hi @RajeshSwarnkar!

You can use ‘Matches’ activity where you need to pass your string as input parameter and your pattern. After that you can use foreach to go through your matches.

Hope this helps! :smiley:

I did not realized there was special activities for the regular expression. Thanks.