Filename secure read

I used the Pattern and Matcher object with a regular expression to
validate the user input. You can compile it and run it to test it.
Filename secure read

Check this out, Compile and run it and try to break it..if you can!