Okay, so I have printed a pages HTML to string, and I am wanting to grab a certain String from it. The thing is it is different every time I load the page. Example:
Blah blah blah 1. name address phone number 2. name address phone number blah blah
There could be anything from 1 to 10 listings.
All I'm interested in is grabbing address and name.
I did try:
public static String removeNonDigits(final String str) {
if (str == null || str.length() == 0) {
return "";
}
return str.replaceAll("\\D+", "");
}
But with no Avail.
Might have to adjust a little I don't know where the whitespaces are exactly: