fork(2) download
  1. import re
  2. p = re.compile(r'\b\d{1,3}(?:\.\d{3})*,\d+\b')
  3. test_str = "|C195|1|Base de Cálculo ST: 2.608,24 - Valor da ST: 2.608.234,24 12.608.234,24\n 163,66|\nd2.608.234,24\n2.60d8.23d4,24"
  4. print(re.findall(p, test_str))
Success #stdin #stdout 0.01s 7736KB
stdin
Standard input is empty
stdout
['2.608,24', '2.608.234,24', '12.608.234,24', '163,66', '608.234,24']