That was just a bad regular expression. When fixed, it works fine on Ruby 1.8.7.