fork download
  1. import re
  2.  
  3. text = "$h;BREWERY$h_end;You've built yourself a brewery."
  4. x = re.findall(r"\$\w+;", text)
  5. print(x)
Success #stdin #stdout 0.02s 9576KB
stdin
Standard input is empty
stdout
['$h;', '$h_end;']