Here is my submission. I hope it's flexible enough for the followup 
quizzes. I sensed there might be a need to access the fields of a match 
by name, which is why I added the RuleMatch#fields method. It returns a 
hash that allows code like

puts Rule.match(line).fields['amount'] # prints the value of the 
<amount> field

This method isn't used in the current code however. But who knows, it 
might come in handy later on.

You can find my submission at http://www.pastie.org/224480

- Matthias
-- 
Posted via http://www.ruby-forum.com/.