libraries/ManiaLib/Utils/Formatting.php
static function stripCodes($string, $codes)
    {
        if (preg_match('/[hlp]/iu', $codes))
            $string = self::stripLinks($string);
        if (preg_match('/[0-9a-f]/iu', $codes))
            $string = self::stripColors($string);
        return preg_replace('/(?<!\$)((?:\$\$)*)\$[' . $codes . ']/iu', '$1', $string);
    }
static function stripCodes($string, $codes)
    {
        if (preg_match('/[hlp]/iu', $codes))
            $string = self::stripLinks($string);
        if (preg_match('/[0-9a-f]/iu', $codes))
            $string = self::stripColors($string);
        return preg_replace('/(?<!\$)((?:\$\$)*)\$[' . $codes . ']/iu', '$1', $string);
    }
Removes each single character code in $codes string
Adding l, h or p will also strip links
Adding an hexadecimal char will also strip colors