I worked at a place that had a profanity filter in two parts.
The first part was in C, several pages of if (!strcmp(x, a)) return 0;
After all that, it then invokes popen() to ssh to another machine and run a shell script there, which contains several more pages of string comparisons, this time in shell.