fix nested regex character class in Ruby 1.8