再加一句
 str = Regex.Replace(str, "sex", "***", RegexOptions.IgnoreCase);