Good day. There is a line:
String str = "887i9qWerty1qwerty24"; I try to highlight the words first:
Pattern p = Pattern.compile("[a-zA-Z]+"); Matcher m = p.matcher(str); while (m.find()) { System.out.println(m.group()); } Then the numbers:
Pattern p = Pattern.compile("[0-9]+"); Matcher m = p.matcher(str); while (m.find()) { System.out.println(m.group()); } Is it possible to isolate both words and numbers in one expression?