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: 230

Filed under:
|

My HTML looks like:

<td class="price" valign="top"><font color= "blue">&nbsp;&nbsp;$&nbsp;      5.93&nbsp;</font></td>

I tried:

String result = "";
        Pattern p =  Pattern.compile("\"blue\">&nbsp;&nbsp;$&nbsp;(.*)&nbsp;</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

Related posts about java

Related posts about regex