I’ve got a regexp that looks for whitespace, hyphens, underscores and %20 in a filename
/\s+|-+|_+|%20+/gi
If the filename has any hyphens etch then they will be converted to spaces. I’m not worred about the extension
- this-is_my%20file­which-is-an_image
will be changed to
- this is my file which is an image
It works fine but I’m not sure if using the case OR case OR case method is the right way to go. Also the above will not match soft hyphens but I’m not sure how to do that.
Cheers.
You can use a shorter version like so: