Make it work in ruby 2.0

Fix issue with main regexp.