Make regular expression compatible with Ruby 1.8

Named groups aren't supported in Ruby 1.8. With this simple change it makes this script compatible with Ruby 1.8 as well.