Regexp anchors in Ruby
Using Ruby's each_with_object