C# Regex to match the word with dot

. is a special character in regex, that matches anything. Try escaping it:

 MatchCollection match = Regex.Matches(entireText, @"alphabet\.");

Leave a Comment