fork download
  1. import re
  2. p = r'(?<!\S)(standard|of|total|sum)(?!\S)'
  3. s = '10-methyl-Hexadecanoic acid of total fatty acids'
  4. print([x.strip() for x in re.split(p,s) if x.strip()])
Success #stdin #stdout 0.02s 9464KB
stdin
Standard input is empty
stdout
['10-methyl-Hexadecanoic acid', 'of', 'total', 'fatty acids']