So I purchased a script package which is using eregi_replace and I do not know how to re-write the code to play with preg_replace()
The error is: Deprecated: Function eregi_replace() is deprecated in /home2/leemonster/scripttk.com/helpDesk/inc/header.php on line 19
The code is:
if (isset($theme_dir))
$temp = preg_replace('/( href=")([^>]*?eticket\.css")/is', '$1' . $theme_dir . '$2', $temp);
if (isset($page))
$temp = str_replace('admin.php', $page, $temp);
if (isset($page))
$temp = str_replace('index.php', $page, $temp);
$header = eregi_replace($bodytag . '.*', '', $temp);
$footer = eregi_replace('.*' . $bodytag, '', $temp);
I've added a delimiter,
/in this case (can be other characters too), that needs to surround allpregregular expressions, as well as theiflag that makes the match case-insensitive. Just make sure that$bodytagdoesn't contain said delimiters unescaped.I'd recommend you read up on how the
pregsuite works, here's a good place to start.