[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [newbie] upper to lower first letter of a word

Mark Wilson

9/23/2003 6:24:00 PM


On Tuesday, September 23, 2003, at 12:34 PM, Yvon Thoraval wrote:

> Recently, i get a vintage list (more than 500 items) with poor typo,
> for
> example, i've :
>
> Côte de beaune-villages
>
> instead of :
>
> Côte de Beaune-Villages
>
> Crémant d'alsace
>
> instead of :
>
> Crémant d'Alsace
>
> i wonder of the way to change lower to upper case and also of
>
> a regex able to do the trick.
>
> something like :
>
> every letter following a " ", "-" or "'" should be upper if not
> belonging to a black list of words :
>
> black_list = %w{d de du la le sec sur entre etc...}

You might adapt the English language 'titlecase' program, which can be
found here:

http://zem.novylen.net/ruby/ti...

Regards,

Mark


1 Answer

yvon.thoravallist

9/23/2003 6:37:00 PM

0

Mark Wilson <mwilson13@cox.net> wrote:

> You might adapt the English language ''titlecase'' program, which can be
> found here:
>
> http://zem.novylen.net/ruby/ti...

Yes, tanxs, that way i''d change more easily rules versus area of
vintage...
--
Yvon