From: Peter Szinek Date: 2007-04-17T23:14:19+09:00 Subject: Re: Regular expression help Guest wrote: > I have a line such as: > > #define BLAH 10 > > or > > #include "BLAH.h" > > and I'm going around in circles trying to just get the 'include' or > 'define' bit...anyone can help me? line.scan(/(#.+?) /)[0][0] HTH, Peter __ http://www.rubyrailways.com :: Ruby and Web2.0 blog http://scrubyt.org :: Ruby web scraping framework http://rubykitchensink.ca/ :: The indexed archive of all things Ruby