In Android ,i have a TextView ,inside the textview ,it contains some text example(22 likes,some times 1 like or empty text).Here i want to get only numbers not characters.so using how to use the String.replaceAll() to get the numbers exactly without empty text.
Here is a sample code …
textview.setText("2 Likes");
String com=textview.replaceAll("","");
use
String.splitto split string in Array as :and you can also use regex expressions to split string
EDIT :
you call also use
String.replaceAllas :