[Solved] Check the characters of a string November 12, 2022 by Kirat [ad_1]Check Regex and SubstringFor your example it would be something likepublic boolean isValid(String h) { return h.substring(1).matches("^[A-H0-9]+$"); } 2[ad_2]solved Check the characters of a string