Try,
String s = "avhguhrgr18543";
for (int i = 0; i < s.length(); i++) {
char ch = s.charAt(i);
if (Character.isDigit(ch) && (ch & 1) == 1) {
// Use bitwise & for performance
System.out.print(ch);
}
}