From: "David A. Black" Date: 2008-05-02T11:34:49+09:00 Subject: Re: Strings Hi -- On Fri, 2 May 2008, Jason Lillywhite wrote: > Could someone help me convert a string with a number in it such as "26.7 > feet" to just the word, "feet"? > > I've searched documentation without luck. Thank you! string[/\w+$/] would give you "feet". A lot depends on how you define the operation you want (last sequence of characters, everything after last number, etc.). David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin INTRO TO RAILS June 24-27 London (Skills Matter) See http://www.rubypal.com for details and updates!