private static function stripEntities(&$string, &$matches)
    {
        $reg_exp = '/&#?[a-z0-9]*?;/su';

        preg_match_all($reg_exp, $string, $matches, PREG_OFFSET_CAPTURE);

        $string = preg_replace($reg_exp, '*', $string);
    }