Like
operator is translated to:
var data = context.UserTable.Where(x=>x.username.Contains("whatever"));
for excluding:
var data = context.UserTable.Where(x=>!x.username.Contains("whatever"));
But, seems you want to use Regex, so follow this:
How to: Combine LINQ Queries with Regular Expressions (C#) | Microsoft Docs[
^]
Example:
List<string> users = new List<string>(){"Adam", "0Barbara", "Aegon", "1Cecylia",
"Zea", "999Robert", "H8tor", "Gre0on",};
string pattern = @"^\d.*$";
Regex r = new Regex(pattern);
var data = users.Where(u=>!r.IsMatch(u));
foreach(string s in data)
Console.WriteLine($"{s}");
EDIT #1
You might be interested in usage of below methods too:
String.StartsWith Method (System) | Microsoft Docs[
^]
String.EndsWith Method (System) | Microsoft Docs[
^]