From: nobu.nokada@... Date: 2004-11-18T13:09:36+09:00 Subject: Re: Regexp bug in 1.9.0? Hi, At Thu, 18 Nov 2004 12:47:46 +0900, Francis Hwang wrote in [ruby-talk:120700]: > Is this behavior a bug, or am I misunderstanding how I should make a > regexp? Not a bug. Ranges in char class must be in order. > irb(main):002:0> str =~ /^[0123456789.-*]+/ > SyntaxError: compile error > (irb):2: empty range in char class: /^[0123456789.-*]+/ > from (irb):2 $ ruby -e 'p ?., ?*' 46 42 > irb(main):003:0> str =~ /^[0123456789*.-]+/ > => 0 '-' at the end of char class is not treated as a range. -- Nobu Nakada