Java gives you the ability to dynamically create strings. Even after you set the string value, you can add more characters to the string value throughout the code. This process lets you build a string ...
A regex of the form [:alpha:]{2}\d{3} should do the trick. If your regex engine doesn't support [:alpha:], use [a-zA-Z] instead.
Community driven content discussing all aspects of software development from DevOps to design patterns. Notice how the output includes only the first String the Java Scanner read. The rest of the text ...