On Tue, Dec 9, 2008 at 9:29 PM, Brian Candler <b.candler / pobox.com> wrote:
> Erika wrote:
>> Hi,
>>
>> I have to check the body of the email which is a html code, like the
>> following:
>> <tr><td>Text1: </td>
>>
>> <td>Text2</td>
>>
>> I have to check that for "Text1" what "Text2" is shown, which can vary
>> for different reasons.
>
> If you are already able to read the E-mail via POP3, and the body
> consists of a single text/html part, then this just becomes a question
> about parsing HTML. Hpricot is usually cited as the best library for
> doing that. I'd say it's not worth digging about with regexps when you
> can do the job properly.
Thx a lot there, but please do not underestimate regexen, especially
as they will become more powerful in 1.9.

Are you aware of dependencies of Hpricot notwithstanding that it is a
wonderful tool.
Being an old Unix guy however I feel that you do not need a full
fledged library + dependencies if a three liner
can do the job.
However if this was only an example and OP needs more parsing Hpricot
is a very sensible way to go.
Cheers
R