fork download
  1. import re
  2.  
  3. s = "• General The general responsibilities of the role are XYZ • Physical Demands The Physical Demands of this role are XYZ • Education Requirements The education requirements for this role are • Bachelor's Degree • Appropriate Certification • Experience 5 years of experience is required"
  4. pattern = r"•\s+[^\s•].*?\s{3,}.*?(?=•[^•\n]*?\s{3}|$)"
  5. result = re.findall(pattern, s)
  6. print(result)
Success #stdin #stdout 0.04s 9936KB
stdin
Standard input is empty
stdout
['• General     The general responsibilities of the role are XYZ ', '• Physical Demands     The Physical Demands of this role are XYZ ', "• Education Requirements     The education requirements for this role are • Bachelor's Degree • Appropriate Certification ", '• Experience     5 years of experience is required']