How to Remove Rows which contains special characters : Digits & Some Specific letters → Example :
1- Remove words containing french letters : é, è, à, …etc( aim is to keep only english words).
2- Remove words containing digits like phone numbers : 234-54-76-21.
I have the following RegEx Expression which can remove only words with digits: Dt.AsEnumerable().Where(Function(x) not
System.Text.RegularExpressions.Regex.IsMatch(x(“Column_Name”).ToString.Trim,“[1]”)).CopyToDataTable`
Can we have one expression for both cases ? Thanks in advance
I’m following the topic: Remove the Rows contains Only Integer value
Here is only integer values but my case need to remove also rows containg words with some letters : é, è, à.
Note : Check example attached here for more clarification , what we have in input and what in output Example.xlsx (9.1 KB)
I tried to modify the expression, unfortunately without success.
It’s Working like this : Dt.AsEnumerable().Where(Function(x) not System.Text.RegularExpressions.Regex.IsMatch(x(“Numeric”).ToString.Trim,“[^A-LN-Za-ln-z]”)).CopyToDataTable