According to this link Search for “whole word match” with SQL Server LIKE pattern
I want to follow the same query string but in a datatable I've written the following statement
Assume datatable contains the following records
datatable[0]["src"]="tst";
datatable[1]["src"]="tst,";
datatable[2]["src"]="tst:";
datatable[3]["src"]="disney";
int p=datatable.AsEnumerable().Select(a => Regex.IsMatch(a["src"].ToString(), "[^a-z]windows[^a-z]")).Count();
but the result was p = 4 while this word 'windows' exists only 3 times
And in case of using 'where' instead of 'select' as following
int p=datatable.AsEnumerable().Where(a => Regex.IsMatch(a["src"].ToString(), "[^a-z]windows[^a-z]")).Count();
p is always 0
What's wrong in my statement ..Any advice?!