Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development December 2009 Entries
SQL's "like" patterns to compare in .Net
I wanted to use SQL's "like" patterns to compare in .Net. I found the good C# implementation of function in thread Using Regex to create a SQL's "like" like function. The function IsSqlLikeMatch works fine, but I've noticed that the search is case-sensitive. It's also doesn't match % if there are multiple lines. But it was easy to change by modifying IsMatch call to return Regex.IsMatch(input, pattern, RegexOptions.IgnoreCase | RegexOptions.Singleline); Note that it could be very serious performance ......

Posted On Tuesday, December 22, 2009 4:18 AM

Copyright © Michael Freidgeim | Powered by: | Join free