I am working on a scenario, where I want to filter the Values of a specific column in a data table. I have used datatable.select(“[Column Name]”=condition but the regex expression in giving errors. The columns contains the Zip values of different regions. In that Zip column some times this type of zip value occurs “MS23SX-7” so I want to remove the entire row in which this type of values occur in Zip column.
Any help in this regard will be highly appreciated!
I have modified the LINQ query you provided according to my conditions the query is like that: (From d In dt.AsEnumerable Where Not System.Text.RegularExpressions.Regex.IsMatch(d(Zip).toString, “[a-zA-Z]”) Select r = d).CopyToDataTable
error is this: ZipColumn_test: ‘name’ argument cannot be null. Parameter name: name