0
我一直在尝试各种奇怪的组合,但只是无法绕过正则表达式,我的头可以帮助我。在德国,被用来代替a。和a。被用来代替例如德国人= 10.000,00英语= 10,000.00我不需要一个分离器。PHP德语货币正则表达式
允许:
- 1,0
- 1,00
- ,5
- 等...
不允许:
- 1.0
- - 5
- ABC
- 0,0€
- 等...
是否有可能用正则表达式,所以如果更改格式有人要输入: 2
或2,0
它会更改为2,00
,如果有人在哪里输入,5
它将更改为0,50
?
可能重复[PHP Unformat money](http://stackoverflow.com/questions/5139793/php-unformat-money/5140046#5140046) – Gordon 2011-03-07 22:27:05
标记'德语'作为[ ** 2012年清理**](http://meta.stackexchange.com/questions/128315/the-great-stack-overflow-tag-question-cleanup-of-2012)。 – 2012-04-30 12:18:35