From: Todd Benson Date: 2008-09-30T13:14:16+09:00 Subject: Re: Underscoming a class On Mon, Sep 29, 2008 at 10:22 PM, Allen Walker wrote: > If I have a String like "DistributionMethod" is there any helper out > there that will turn it into "distribution_method" ? I'm sure there's one out there, but for simple cases... s = "SomeCamelCase" s.scan(/.*?[A-Z].*?[^A-Z]*?/).map {|w| w.downcase}.join("_") Todd