I have the following regex
/(\.|\/)(gif|jpe?g|png)$/i
Which works for fileNames in ensuring on gif, jpeg and png's are accepted. However, I want to extend this code to also check fileNames and ensure they don't contain dangerous characters like
!@#$%^&*()
- How can I do this ?
- How can I "replace" these with "" ?