fork download
  1. import re
  2. text = "[H] $10 [W] 100 credits"
  3. print( dict(re.findall(r'\[([HW])][^][\d]*(\d+(?:\.\d+)?)', text)) )
Success #stdin #stdout 0.02s 9420KB
stdin
Standard input is empty
stdout
{'H': '10', 'W': '100'}