boolean (@NotNull String text) { for (int i = 0; i < text.length(); i++) { final char c = text.charAt(i); if (Character.isDigit(c) && c != '0') return false; final char d = Character.toUpperCase(c); if (d == 'E' || d == 'P') break; } return true; }