Hi, everyone, i've got below function to return true if input is badword
public bool isAdultKeyword(string input)
{
if (input == null || input.Length == 0)
{
return false;
}
else
{
Regex regex = new Regex(@"\b(badword1|badword2|anotherbadword)\b");
return regex.IsMatch(input);
}
}
above function only matched to whole string i.e if input badword it wont match but it will when input is bawrod1.
what im trying to do it is get match when part of input contains one of the badwords