fork(1) download
  1. import re
  2. text = "४०० pounds of wheat at $ 3 per pound"
  3. matches = re.findall(r'(\d+(?:[.,]\d+)*)(?:\s*(\w+))?', text)
  4. print( [(x, y) for x, y in matches] )
Success #stdin #stdout 0.03s 9616KB
stdin
Standard input is empty
stdout
[('४००', 'pounds'), ('3', 'per')]