Basically, I'm attempting to pull data from a website by using an HTTP GET request. I create a scanner which looks through all of the information pulled from the GET request. My question specifically is how I can get the Scanner to recognize a range of float values within this desired pattern. The pattern is as follows:
"<strong>
xk</strong> <div class="match_details_cell_label">Gold</div>"
The letter x above represents a float which could be in the range [0.0-50.0]. My question is how do I represent that to the Scanner. I'm familiar with how to check if an integer is within a set of values, but how do I incorporate that notion of "range" while scanning?
GetGameInfo http = new GetGameInfo();
System.out.println("Testing 1 - Send Http GET request");
Scanner lolscan = new Scanner(http.sendGet());
String gameGold =
lolscan.next("<strong>" + [0-30] + "k</strong><div class=\"match_details_cell_label\">Gold</div>");
As you can see, I tried concatenating a range of acceptable values, but I don't think this is the right way to go about it. Any suggestions?