From: Ross Bamford Date: 2006-05-06T03:49:59+09:00 Subject: Re: Noob Question - String Manipulation... On Sat, 2006-05-06 at 02:28 +0900, Joe Cairns wrote: > Hey, I'm pretty new to Ruby and am trying to absorb the "ruby way" of > things as much as I can. What's the best way to solve this problem: > > I have a string that contains html formating. All I want is the plain > text. > There's more to this than meets the eye - it's often best to hand off the hard stuff to someone else :) def fetchtext(uri) `lynx --dump #{uri}` end puts fetchtext('www.google.com') # => # [1]Personalised Home | [2]Sign in # # Google # # Web [3]Images [4]Groups [5]News [6]Froogle [7]more 損 # # ... [snipped] ... -- Ross Bamford - rosco@roscopeco.REMOVE.co.uk