Update Datatable based on regex Pattern


I want to update data table based on the matched pattern

Pattern : App[0-9]{3} ,Soft[0-9]{3}
data Table

How can i update Type column in data table with Linq or Enumerable method ?


Is the above image input data? Can you share expected output?



It would be better you can share the input table and the expected output table. Based on that we can suggest a linq query.

Also the conditions to update the Type column

Hi @Yoichi

Yes… I’d and Value are input columns and Type is output column

Hi @Rahul_Unnikrishnan

Above image having col ID and Value is input table
And table with ID,Value and Type is output table

If value column matching This pattern App[0-9]{3}
Then Type column = App

I’d value column matching this pattern Soft[0-9]{3}
Then Type column = Software


Please find the attached. Its working as expected.
Excel.zip (74.8 KB)

Thank You @Rahul_Unnikrishnan Yes, It will work this way, But i want to do with Linq or Enumerable Function want to avoid For each…

Like with System.RegularExpression.Regex something like that,… Is is Possible ?