Java regex, need help with escape characters
Posted
by Blankman
on Stack Overflow
See other posts from Stack Overflow
or by Blankman
Published on 2010-04-17T23:42:32Z
Indexed on
2010/04/17
23:43 UTC
Read the original article
Hit count: 255
My HTML looks like:
<td class="price" valign="top"><font color= "blue"> $ 5.93 </font></td>
I tried:
String result = "";
Pattern p = Pattern.compile("\"blue\"> $ (.*) </font></td>");
Matcher m = p.matcher(text);
if(m.find())
result = m.group(1).trim();
Doesn't seem to be matching.
Am I missing an escape character?
© Stack Overflow or respective owner