Update:
You can use a matcher with a regex to extract out the various pieces of the template input sentence which you expect.
String input = "Hello today is 03/17 current time is 03:20 humidity is 50%";
Pattern p = Pattern.compile("(.*) today is (.*) current time is (.*) humidity is (.*)");
Matcher m = p.matcher(input);
if (m.find()) {
System.out.println("Found greeting: " + m.group(1));
System.out.println("Found date: " + m.group(2));
System.out.println("Found time: " + m.group(3));
System.out.println("Found humidity: " + m.group(4));
}
Output:
Found greeting: Hello
Found date: 03/17
Found time: 03:20
Found humidity: 50%
Note that capture groups begin at index 1, not 0, because m.group(0) returns the entire original string against which the regex is being applied.
Below is my original answer, which was given before you updated your question:
One simple approach would be to just split the sentence by whitespace, and then retain any terms which have at least one number in them:
String input = "Hello today is 01/17 current time is 03:20 humidity is 50%.";
String[] parts = input.split("\\s+");
for (String part : parts) {
if (part.matches(".*\\d+.*")) {
System.out.println(part);
}
}