From: Brian Candler Date: 2003-04-17T16:25:48+09:00 Subject: Re: [Q] Reg. Expressios with "\n" On Thu, Apr 17, 2003 at 08:56:57AM +0900, Daniel Carrera wrote: > Definitelly. I also believe in using the right tool for the job. > > I didn't fully explain what I was trying to do. You see, I actually *am* > using an HTML parser, in the form of an external program (lynx -dump). > All I need is to extract the HTML code so I can send it to lynx. > > For this an HTML parser looked like using a sledgehammer to swat a fly, > and an RE looked like a flyswatter. > > Then again, perhaps calling `lynx` just for an HTML dump is > sledgehammerish... Using lynx to convert HTML to formatted ASCII is a good solution for the job (I have mutt configured to use it for this purpose), although it doesn't do a good job of rendering tables. It sounds to me that what you really want is a MIME parser, which will break your mail into chunks - the chunk(s) that are declared to contain HTML (by 'Content-Type: text/html') can then be sent wholemeal to lynx, you don't need to look at the content at all. Cheers, Brian.