RubyMoney/money — pull request #156 by alup (2012-03-15 09:30:08+00:00)
Title: Fix format output with custom currencies (4 decimal places)

For the following custom currency:

```
# Euro with 4 decimal places
Money::Currency.register({
:priority => 1,
:iso_code => "EU4",
:name => "Euro with subcents",
:symbol => "€",
:symbol_first => true,
:subunit => "Subcent",
:subunit_to_unit => 10000,
:thousands_separator => ".",
:decimal_mark => ","
})
```

I was getting:

```
irb(main):003:0> Money.new(33310034, "EU4").format
=> "€3.331,0.034"
```

Instead of "€3.331,0034"

This changeset fixes the Regex which is used to place the thousands separator.