Apr-04-2022, 07:34 PM
(Apr-04-2022, 12:03 AM)bowlofred Wrote: Beware the dot. It's unescaped in your last version so it can match other characters (including spaces).
>>> re.findall(r"[-+]?[0-9]*.?[0-9]+", "5.72 +45x843 hi 32") ['5.72', '+45x843', ' 32'] >>> re.findall(r"[-+]?\d*\.?\d+", "5.72 +45x843 hi 32") ['5.72', '+45', '843', '32']
Great tip .... thank you
