So yes, to accomplish this you could easily do:
on *:text:bad*word:#: {
do something
}
and
on *text:word*bad:#: {
do something
}
However this isn't really scalable. Back to my original comment, i would make a text file to read in bad words, then you can easily put them in this file in the future. Either manually or add a command to do it through chat.