using System; using System.Text.RegularExpressions;
public class Example
{ public static void Main()
{
string pattern = @"\bth[^o]\w+\b";
string input = "this is a test";
foreach (Match match in Regex.Matches(input, pattern))
Console.WriteLine(match.Value);
}
}