Hi All,
I need to check if input string contains any of the word from datatable . if works fine for single word ,but fails if the datatable has multiple words in a row.
For eg let have datatable as
Col A
Order
Help
Do you
Inputstr = Hi How are you .
(This condition should give boolean value as false ,but it give true as “You” is in datatable).
Currently I split the input string and use linq.
dt_word.AsEnumerable.Any(Function(r) r.ItemArray.Any(Function(o) ArrInput.Any(Function(s) System.Text.RegularExpressions.Regex.IsMatch(o.ToString,“\b”+System.Text.RegularExpressions.Regex.Escape(s)+“\b”,System.Text.RegularExpressions.RegexOptions.IgnoreCase))))