fork(2) download
  1. import re
  2. sal= '41 000€ à 63 000€ / an' #this is a sample string for which i have errors
  3. regex = '(?<!\S)([0-9]+(?: [0-9]{1,3})?)€(?!\S)'
  4. print(re.findall(regex,sal)) # ['41 000', '63 000']
Success #stdin #stdout 0.01s 27712KB
stdin
Standard input is empty
stdout
['41 000', '63 000']