Extracting Specific Data from a Row in a DT Variable

Hello everyone. I’m trying to extract certain data from a row in a DT Variable.

I attached a screenshot showing the data contained by the DT variable. As you can see, I have only one column and i need to extract the year ranges in it ( " [06.1991 - 10.1997] " and " [04.1992 - 10.1997]" )

I think using a Linq method would help but I’m not sure how to implement it.

Thanks in advance!

Screenshot 2022-08-09 115439

Hi @alex_T

you can use this expression to extract the year ranges from a specific value for each row

(([\d{1,2}([.])\d{1,4}(\s+))([-])(\s+)(\d{1,2}([.])\d{1,4})(]))

1 Like

Hi @alex_T

You can this approach

Xaml for reference

ExtractingSpecificDataFromRow.xaml (7.6 KB)

Hi @alex_T , I hope you are doing well.

For your use case I think using regex expression will be more convenient.
[\d{1,2}.\d{1,4}\s-\s\d{1,2}.\d{1,4}]

The above provided regex expression will help you to match your desired string and you can extract that.

Thanks & Regards,
Shubham Dutta

Hello everyone and thanks for your help! I have found the solution I needed, using the following RegEx - ([).*(])

This gets the exact info I need

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.