From: w_a_x_man Date: 2010-12-09T16:45:16+09:00 Subject: Re: Splitting on capital letters On Dec 8, 5:47 pm, Ralph Shnelvar wrote: > [Note:  parts of this message were removed to make it a legal post.] > > Assume I have camelized string like >   BenefitsAndFeatures > and I want to convert that to >   Benefits-And-Features > > What is a good "Ruby way" to do that? The good Ruby way: "BenefitsAndFeatures".gsub( /.(?=[[:upper:]])/, '\&-' ) ==>"Benefits-And-Features"