public int CountOfBannedWords(string content)
        {
            var bannedWords = _banWordsReader.GetBannedList();

            bannedWords = bannedWords.Select(bannedWord => bannedWord.ToLower()).ToList();

            return(bannedWords.Sum(r => new Regex(String.Format(_wordRegexProvider.GetWordMatchingRegex(), r)).Matches(content).Count));
        }
        public string BannedTextFilter(string content)
        {
            if (!_enableFilter)
            {
                return(content);
            }

            var bannedWords = _banWordsReader.GetBannedList();

            return(bannedWords.Aggregate(content, func: (current, banWord) => DecoreateBanWord(new Regex(String.Format(_wordRegexProvider.GetWordMatchingRegex(), banWord)).Matches(current), current, banWord)));
        }