"直接上源码 # 匹配千分位金额 import re print(re.compile(r'^((\d{1,3}(,\d{3})*(.((\d{3},)*\d{1,3}))?)|(\d+(.\d+)?))$').match('123.12') ...."
# 匹配千分位金额 import re print(re.compile(r'^((\d{1,3}(,\d{3})*(.((\d{3},)*\d{1,3}))?)|(\d+(.\d+)?))$').match('123.12').group(0))
匹配千分位金额(支持负数) import re
print(re.compile(r’^(-{0,1}(\d{1,3}(,\d{3})(.((\d{3},)\d{1,3}))?)|(\d+(.\d+)?))/span>).match(‘123.12’).group(0))
匹配千分位金额(支持负数) import re
print(re.compile(r’^(-{0,1}(\d{1,3}(,\d{3})(.((\d{3},)\d{1,3}))?)|(\d+(.\d+)?))/span>).match(‘123.12’).group(0))