我有许多类似的字符串Current Level: 13.4 db.,我想提取浮点数.我说漂浮而不是十进制,因为它有时是完整的.RegEx能做到这一点还是有更好的方法?
Current Level: 13.4 db.
python regex floating-point data-extraction
如何使用正则表达式从字符串中提取double值.
import re pattr = re.compile(???) x = pattr.match("4.5")
python regex
python ×2
regex ×2
data-extraction ×1
floating-point ×1