Hi, 

In message "[ruby-talk:01591] Certain char's not recognized by "." in regex?"
    on 00/02/26, Wes Nakamura <wknaka / pobox.com> writes:

>(0..0xff).each { |i|
>
>  r = Regexp.new(format("\\x%02x([\\xa1-\\xf3])", i))
>  a = (i.chr() + "\xa2").sub(r, i.chr() + "\\1")
>  printf "0x%02x=%2d  %s\n", i, (x = i.chr() =~ /./p).nil? ? -1 : x, a
>      
>}

Because Ruby's regexp is Japanese character code sensitive, some
substrings are not matched by `/./'.  I know three solutions.

(1) Compile after `./configure --with-default-kcode=none'
(2) $KCODE = "none" before pattern-matching. 
(3) Use non-Japanese character code regexp option `n':
   printf "0x%02x=%2d  %s\n", i, (x = i.chr() =~ /./pn).nil? ? -1 : x, a

Hope this helps

-- gotoken