The money gem http://money.rubyforge.org/String.html Might be worth a look they have a nice parser.