fork(1) download
  1. import re
  2. pattern = r"\b(?P<subsection>\d+(?:\s+\d\w*)+)\s+(?P<name>.*?)\s+(?P<date>\d{1,2}/\d{1,2}/\d{2})\b"
  3. text = "26 24 16 Panelboards 10/05/18 26 26 00i Power Distribution Units – Install 10/05/18"
  4. print([x.groupdict() for x in re.finditer(pattern, text)])
  5.  
Success #stdin #stdout 0.03s 9644KB
stdin
Standard input is empty
stdout
[{'subsection': '26 24 16', 'name': 'Panelboards', 'date': '10/05/18'}, {'subsection': '26 26 00i', 'name': 'Power Distribution Units – Install', 'date': '10/05/18'}]