$str = D:\UniServerZ\www\CodeIgniter226a\application\controllers\test_2.php
preg_replace('/\\\\/', '-', $str);
preg_replace("/\\\\/", '-', $str);
$str = D:/UniServerZ/www/CodeIgniter226a/application/controllers/test_2.php;
preg_replace('/\//', '-', $str);