Hi -- On Thu, 26 Jun 2008, Justin To wrote: > > p.gsub(/[^(v| )]/i) {|m| t.concat(m)} > > > Oh, I got it... but now I'm stuck on how to remove '.' if it's the last > piece of the string > > e.g. "v4.5." > > I want to remove the last "." If you've just got that string and want to remove the last '.', as a separate operation, you can do: str.chomp!('.') David -- Rails training from David A. Black and Ruby Power and Light: ADVANCING WITH RAILS June 16-19 Berlin ADVANCING WITH RAILS July 21-24 Edison, NJ See http://www.rubypal.com for details and updates!