From: Brian Candler Date: 2008-12-10T05:29:31+09:00 Subject: Re: pop3 body email Erika wrote: > Hi, > > I have to check the body of the email which is a html code, like the > following: > Text1: > > Text2 > > 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. If your E-mail is a multipart/alternative then you may need a bit more work to extract the text/html part first. The rubymail library may help here. -- Posted via http://www.ruby-forum.com/.