Hi -- On Wed, 24 Sep 2003, Yvon Thoraval wrote: > Yvon Thoraval <yvon.thoravallist / -SUPPRIMEZ-free.fr.invalid> wrote: > > > > > > string.gsub!(/\b[a-z]+/) { |w| black_list.include?(w) ? w : w.capitalize } > > > > a lot of tanxs ) > > it seems, it's a little bit trickier because accentuated characters are > taken as \b for example : > > Vosne-romanñÆ > becomes : > Vosne-Romanñ¦ I believe the /s modifier to the regex will help you here by changing the encoding, though I'm having character-rendering issues which make it hard for me to test.... But try this, in the hope that I'm right even though I can't see the characters: str.gsub!(/\b[a-z]+/s) {|w| black_list.include?(w) ? w : w.capitalize} David -- David Alan Black home: dblack / superlink.net work: blackdav / shu.edu Web: http://pirate.shu.edu/~blackdav