From: Dav Jones Date: 2006-12-13T00:31:47+09:00 Subject: Re: Newbie questions Thanks. I've got it reading in a file and checking each line against a regular expression. How would I go about taking individual sections of a line? i.e. if the word 'example:' appears on a line then it takes that and a few characters before or after it (it will be something specific its just the question is in general here) so for blah blah blah example: twenty blah blah it returns me 'example: twenty' -- Posted via http://www.ruby-forum.com/.