From: Eero Saynatkari Date: 2006-09-15T08:43:07+09:00 Subject: Re: Keep only one part of a string Zouplaz wrote: > Hello, how to better write that : self.ident = self.ident[/0-9*/] > > I'm pretty sure there is a String method that would keep only the first > match of the regex but I didn't found it in the String doc reference ri String#slice, ri String#slice! > Thanks -- Posted via http://www.ruby-forum.com/.