diff --git a/src/PriceFormatter.php b/src/PriceFormatter.php index 2bff95b..24027ab 100644 --- a/src/PriceFormatter.php +++ b/src/PriceFormatter.php @@ -33,7 +33,7 @@ class PriceFormatter $formatted = ltrim($formatted, $currency->prefix()); $formatted = rtrim($formatted, $currency->suffix()); - $removeNonDigits = preg_replace('/[^\d'.preg_quote($currency->decimalSeparator()).']/', '', $formatted); + $removeNonDigits = preg_replace('/[^\d' . preg_quote($currency->decimalSeparator()) . ']/', '', $formatted); if (!is_string($removeNonDigits)) { throw new \Exception('The formatted string could not be resolved to a valid number.');