I need to convert 4 ereg_replace expressions to preg_replace. I've been trying various combinations based on tutorials and not getting too far with getting my site to work.
Can some kind soul assist me in resolving these?
$path = ereg_replace('\.[\.]+', '', $path); // remove any '..' (jumping up a directory)
$path = ereg_replace('/[/]+', '/', $path);
$back_url = ereg_replace('dir=[^\&]*', "dir=$back_directory", $this->current_url);
$dir_url = ereg_replace('dir=[^\&]*', "dir=$dirpath", $this->current_url);
Thanks