My result after passing the value "A2A" - which should return false I want to check that a three character string matches the format 12A. The first two must be a digit and the 3rd must be a letter. The string "A2A" must therefore return false. What is happening here and how stupid am I being?
I've tried various ways of doing this and nothing seems to work.
Just use
String#matches()here with a regular expression: