Fixed some regex to work with Ruby 2.0, too