fork download
  1. import re
  2.  
  3. regex = r"\|(.+?)\|"
  4. string = "PROTEIN\\t1\\t0\\ttr|Q6ZN40|Q6ZN40_HUMAN\\t\\t-1\\t;;;;;"
  5. print(re.search(regex, string).group(1))
Success #stdin #stdout 0.02s 9508KB
stdin
Standard input is empty
stdout
Q6ZN40