fork download
  1. import re
  2. rx = r"(?i)fax\W*\d[\s\d]*|(\d[ \d]*\d)"
  3. s ="text\nAdresse quai du Sa fax 06 32 32 32 33 rtel – 59100 ROUBAIX| FRANCE\nfaTel : 0 8 99 70 1761 – Fax : 06 32 32 32 34\nMail :support@domain.com\n06 32 32 32 35\n\nFax 06 32 32 32 36\ntel 06 32 32 32 37 henrg"
  4. res = filter(None, re.findall(rx, s))
  5. print(res)
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
['59100', '0 8 99 70 1761', '06 32 32 32 35', '06 32 32 32 37']