- var_dump: documentation ( source)
- addslashes: documentation ( source)
- str_replace: documentation ( source)
- preg_replace: documentation ( source)
<?php
$input = addslashes("Sc\reen S/hot 20'14-05-19 at 14.21.22");
//preg_match('/([a-z0-9\-\.]+)/i', , $input);
preg_replace('/\\\\/', '', $input);
var_dump($input);
$filename = str_replace(["\n", "\r", "\t", "\b", "\f", "\a", "\v", '/', '\'', ' '], '_', $input);
var_dump($filename);