I am trying to find some rates in a table using Regular Expressions that I am reading into a string from HTML. Here is an example:
<td>Euro</td>
<td class='rtRates'><a href='/graph/?from=USD&to=EUR'>0.772199</a></td>
<td class='rtRates'><a href='/graph/?from=EUR&to=USD'>1.295003</a></td>
I am trying to find the numbers contained in the above string. They constantly change so it can't be a hard-coded number search.
I've tried using something similar to this: to=EUR'>(...)
but it only returns the 0.7, not the rest. Any help is appreciated!
EDIT: some code was requested, so here it is
String re2="to=EUR'>(...)"; // Float 1
Pattern p = Pattern.compile(re2,Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
Matcher m = p.matcher(webData);
if (m.find())
{
String float1=m.group(1);
System.out.print("("+float1.toString()+")"+"\n");
}