testing patterns http://stackoverflow.com/questions/30751885/check-if-a-string-ends-in-is-valid-or-not-in-java-using-regex