We just upgrade to PHP7 and the eregi function is now not working and I need to convert it to preg_replace. I've looked over a couple other topics which are requesting the same thing. I am having an issue with the syntax.
Current code
$body = eregi_replace("[\]", '', $body);
I've tried the following but it looks like it's not fully working as $body looks to be empty.
$body = preg_replace('[\]', '', $body);
Any help would be appreciated.