From: Axel Etzold Date: 2007-06-27T23:50:53+09:00 Subject: Re: RegExp & File read help Hi Don, > I am sure there is probably a > way to do this using an xml parsing library, but I thought it might > be just as easy to do so with regular expressions. Hpricot is a good choice. > > Where I am getting stuck is in the next code fragment, in which I am > testing each line to see if there is a match. There should be as the > string I used above for testing was pulled directly from one line of > the file. Unfortunately, I get an error and no -matches. > > _________ > regexp = Regexp.new(/(\w*) In the regexp, you need to escape the minus sign also, otherwise, it is interpreted as a range of signs, i.e. f-t =['f','g',...,'t'] > regexp = Regexp.new(/(\w*) > <\/Font\-family>/m) Best regards, Axel -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser