From: Assaph Mehr Date: 2005-07-06T12:55:46+09:00 Subject: Re: Extract/Parse String? Use regular expressions (http://www.ruby-doc.org/docs/ProgrammingRuby/html/intro.html#S5), then #scan the string for something that matches. Eg. assuming the format is always 'treeframe' followed by digits: irb(main):038:0> c.scan /treeframe\d+/ => ["treeframe1120266500902"] You'll get an array with all the results. If you know you have only one occurence you can use String#slice (or String#[]) to get the first value: irb(main):037:0> c[/treeframe\d+/] => "treeframe1120266500902" HTH, Assaph