> I know your boss and whoever it is who is dangling your carrots won't let > you use Hpricot, but tell him you will use Hpricot to get properly formatted > html and then write a parser to parse the properly formatted html. Even he > can't be opposed to that(seeing as how he wants you to reinvent wheels). > That way you can get rid of your whitespace problem and deal with the cosmos > at large. Here's what we know about Arun from his previous posts... * he is a "trainee" doing assignments. * he is learning ruby * "nobody else" around him knows ruby * his "boss"/teacher is giving him specific assignments that seem to be purely academic exercises, because the constraints (e.g. don't use gsub, parse "example.com") would otherwise be completely ridiculous. * He doesn't have the authority to re-scope the assignment or offer alternate solutions. I believe he is asking us to do his homework.