From: Ian Macdonald Date: 2007-02-14T07:07:47+09:00 Subject: Re: Puzzling regex behaviour On Wed 14 Feb 2007 at 06:45:08 +0900, Robert Klemme wrote: > Maybe there is an initialization in .irbrc that leads to a changed > locale inside IRB. Nope; I had hoped it would be that easy, but as you can see from my snippet of output, I started irb with -f, which bypasses ~/.irbrc. ENV['LANG'] also prints nl_NL in irb, so that can't be it. > Or your IRB belongs to a different Ruby version on that system. I compiled it myself, so there has been no mix-and-matching. > Other than that, I guess you tripped into the wide and wild country of > i18n - many strange things can be found there. Maybe \w and \W only > treat ASCII [a-z] characters as word characters. It does seem that way, as Perl also appears to treat them this way. However, I'm still puzzled why there's a difference between irb and a stand-alone script. Ian -- Ian Macdonald | If you are what you eat, I guess that makes ian@caliban.org | me a cheese danish. -- Anonymous http://www.caliban.org/ | | |