fork(1) download
  1. import re
  2. s = "The {name_of_list} list contains {list:a, b, and c}. This list should be formatted as a, b, and c."
  3. print(re.findall(r'\{[^{}]*?:a, b, and c}', s))
  4.  
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
['{list:a, b, and c}']