fork(1) download
  1. import re
  2. rx = r"(.*?)(\d+(?:[.]\d+)?)"
  3. ss = ["CA$1.90", "RM1"]
  4. for s in ss:
  5. print(re.findall(rx, s))
  6.  
Success #stdin #stdout 0s 23352KB
stdin
Standard input is empty
stdout
[('CA$', '1.90')]
[('RM', '1')]