public function removeBadWords($string)
    {
        // read bad-word-table if not already read-in
        if (!$this->_badWordTable) {
            $this->_createBadWordTable();
        }

        // cut value into pieces
        $words = explode(' ', trim($string));

        // get replace character
        try {
            $replacecharacter = $this->getConfiguration()->words->replacecharacter;
        } catch (Doozr_Configuration_Service_Exception $exception) {
            $replacecharacter = '*';
        }

        // iterate over each word
        foreach ($words as $key => $word) {

            // clean word from special chars
            $word = preg_replace('/[^a-zA-Z0-9]+/', '', $word);

            foreach ($this->_badWordTable as $badWord) {
                if (preg_match('/^'.$badWord.'/im', $word)) {
                    $words[$key] = preg_replace(
                        '/^'.$badWord.'+/im',
                        str_repeat($replacecharacter, mb_strlen($badWord)),
                        $word
                    );
                    break;
                }
            }
        }

        // return the result
        $result = implode(' ', $words);

        return $result;
    }