Hello, I have this script where it checks the name of a folder, and only allows if it is in format of "something" or "blah blah" preg_match ( '#[^a-z0-9_\s]|\s{2,}#i', $folder_name ) Code (markup): Can anyone help me turn that into something which only allows folder with a "-" instead of space ? or which replaces space with a "-" I tried looking through http://www.php.net/preg_match but got stuck... Thanks