Notes about upgrading to PhP 5.3.3.
ereg functions are now deprecated
The solution is to use the corresponding preg:
 eregi("xxx") -> preg_match('@xxx@i')
@ is used to start and the pattern. Any character can be used, we use @ so as to not match /
i indicates that the search is case insensitive. See Pattern Modifiers
 ereg_replace -> preg_replace
Same rules as above about start and end
PCRE regular expressions need the s modifier to match newlines in a multiline expression.
To handle the <!--margin--> directives in the toc files, html.inc.php had lines like
if (eregi("(.*)", $toc, $tmp)) {
The proper replacement is
 if (preg_match("@(.*)@is", $toc, $tmp)) {
Note that the regex ends in is, which means case insensitive "dot metacharacter in the pattern matches all characters, including newlines."