String (@Nullable String tag) { if (tag == null) return null; int start = -1; for (int i = 0; i < tag.length(); i ++) { char c = tag.charAt(i); if (Character.isAlphabetic(c)) { if (start < 0) start = i; } else { if (start >= 0) return tag.substring(start, i); } } return start >= 0 ? tag.substring(start) : null; }