Fix regexp for Ruby 1.8.7

There is no hexadecimal character class.