fork download
  1. import re
  2. regx = '-\s(?:[\w\s\/?,;!:#&@]+|-\w+)+'
  3. z = re.findall(regx, 'We need the list fo the following products: - Abcd efgh ejklm - Efgh-ij sklrm, defasad - KLMNNOP/QRS dasfdssa eadsd')
  4. for p in z:
  5. print(p)
Success #stdin #stdout 0.03s 9344KB
stdin
Standard input is empty
stdout
- Abcd efgh ejklm 
- Efgh-ij sklrm, defasad 
- KLMNNOP/QRS dasfdssa eadsd