From: Caleb Clausen Date: 2010-04-28T23:20:47+09:00 Subject: Re: win32 ruby1.9 regexp and cyrillic string On 4/27/10, Nikolay Khodyunya wrote: > #coding: utf-8 > str2 = "asdfМикимаус" > p str2.encoding # > p str2.scan /\p{Cyrillic}/ #found all cyrillic charachters > str2.gsub!(/\w/u,'') #removes only latin characters > puts str2 > > The question is why /\w/ ignore cyrillic characters? I think that \w (and similar shortcuts) is supposed to match ascii characters only... thus it's equivalent to [a-zA-Z]. Isn't there some kind of unicode character class you can use?