Menu
I’ve got is a system where users can duplicate directories
I want the user to be only allowed to enter characters and numbers when choosing a new name for the duplicated directory
ALL other characters should be left out AND white space characters need to be replaced with a single ‘-‘ (no matter how many of them)
I’ve got this to replace white space characters:
$str = preg_replace(‘%s+%’,’-‘, $str);
But I’m a little clueless as to how to replace ANY other character that isn’t a character or number
ANY help would be appreciated
Thanks
OM