I have a regexp to validate file names. Here is it:
/[0-9a-zA-Z\^\&\'\@\{\}\[\]\,\$\=\!\-\#\(\)\.\%\+\~\_ ]+$/
It should allow file names like this:
aaa
aaa.ext
a#
A9#.ext
The following characters are not allowed \ / : * ? \" < > |
The problem is that file names like *.txt
or /\kk
passes the validation. I am doing validation with keyup event. So when I put one extra character after not allowed one it shows that everything is correct.