mb_eregi error - need advice on how to solve
<pre><code>function encoded_header($raw) 
{
    mb_internal_encoding('UTF-8');
    mb_regex_encoding('UTF-8');

    if ( mb_eregi('[^][&lt;&gt;a-z0-9 _".()/;,:+@|-]', $raw)  ) 
    {
        $chunks = str_split($raw,  20 );
        $encoded = array();

        foreach ( $chunks as $chunk ) 
        {
            array_push($encoded,  base64_encode( $chunk )  );
        }

        return '=?utf-8?B?' . implode('?==?utf-8?B?', $encoded) . '?=';
    } 
    else 
    {
        return $raw;
    }
}
</code></pre>

<p>The above function, when called, gives me:<br></p>

<pre><code>Error: [2] - mb_eregi() [function.mb-eregi0]: mbregex compile err: premature end of char-class
</code></pre>

<p>We recently updated our php to version 5.3.3 and we encounter this error. Our previous version 5.0.2 worked fine.<br>
I searched google but did not come up with anything useful. Anyone got any suggestions on how to fix this error?</p>
