diff --git a/lib/OfxParser/Ofx.php b/lib/OfxParser/Ofx.php index c3d0b6e..dac8acd 100644 --- a/lib/OfxParser/Ofx.php +++ b/lib/OfxParser/Ofx.php @@ -311,11 +311,7 @@ private function createAmountFromStr($amountString) { // Decimal mark style (UK/US): 000.00 or 0,000.00 if (preg_match('/^-?([\d,]+)(\.?)([\d]{2})$/', $amountString) === 1) { - return (float)preg_replace( - ['/([,]+)/', '/\.?([\d]{2})$/'], - ['', '.$1'], - $amountString - ); + return floatval($amountString); } // European style: 000,00 or 0.000,00