Can you please rewrite this `Regexp` to be compatible with Ruby 1.8.7?