From: Peter Szinek Date: 2007-01-20T00:54:59+09:00 Subject: Re: Copying strings WoodHacker wrote: > I can't believe this hasn't been answered a thousand times, but I can't > seem to find the answer in the group archive. > > I am parsing a string into @text (i.e. abc.def) I want to save the > part before the dot into @firstpart . For example: why not 'abc.def'.scan(/(.+)\./)[0] ? Peter __ http://www.rubyrailways.com