From: x1 Date: 2006-09-30T09:11:58+09:00 Subject: Re: newbie: how to find & extract a string from a file I'm sure someone will have a better way of doing this.. but.. Assuming it has ## imgs = [] IO.readlines("c:/somefile.html").each {|line| imgs << line.split(" wrote: > Hi, > > Just starting out to explore Ruby (I like it) and I have > a question. > > I have an HTML file that contains several references to jpg files. > > I would like to extract the filename with the .jpg extension. > What is the best approach for this? > > It appears each .jpg reference is on its own line. > > Thanks! > > Esmail > >