How to extract numbers or alphabets from a String in Java?

preview_player
Показать описание
#Java #SimpleProgrammingApproach
Рекомендации по теме
Комментарии
Автор

Simple and very helpful
System.out.println(input.replaceAll("[0-9]", ""));
System.out.println(input.replaceAll("[^0-9]", ""));

sriharibabunidamanuri
Автор

i have issue with extracting the first three elements in arraylist if anyone helps would be appreciated.

f.a