From: Brian Candler Date: 2010-07-05T19:12:20+09:00 Subject: Re: File data extraction Rolf Pedersen wrote: > My initial idea was to treat the whole thing as one long string, and > extract > the part within the being-end-block by using regexp, converting the > result > back to individual lines (split '\n') and doing array.map and regexp to > single out the name in the first quote on each line. > But I keep hitting the wall, especially with the first step in this > approach... :o( How about this for starters: p src.scan(/^@begin(.*?)^@end;/m) -- Posted via http://www.ruby-forum.com/.