From: Shri Borde Date: 2009-02-06T03:10:03+09:00 Subject: [ruby-core:21866] Re: Bug with [:lower:] Yes, my mistake. -----Original Message----- From: Yukihiro Matsumoto [mailto:matz@ruby-lang.org] Sent: Thursday, February 05, 2009 10:06 AM To: ruby-core@ruby-lang.org Subject: [ruby-core:21865] Re: Bug with [:lower:] Hi, In message "Re: [ruby-core:21863] Bug with [:lower:]" on Fri, 6 Feb 2009 02:56:40 +0900, Shri Borde writes: |[:upper:] works as expected. [:lower:] matches incorrectly to an empty position at the start of the string. It's the same with both 1.8.6 and 1.9. It's not a bug. You've specified ZERO or more lower case letters, so it matches CORRECTLY to an empty position at the start of the string. You have to use + instead of *, if you want to match ONE or more lower case letters. matz.