fork download
  1. import re
  2. text = "\r\n1115492_23181_0_0.g.vcf.gz.tbi\r\n1115492_23181_0_0.vcf.gz\r\n1115492_23181_0_0.vcf.gz.tbi\r\n..."
  3. m = re.search(r"(?m)^((?:(?!\.g).)*\.vcf\.gz)\r?$", text, re.M)
  4. if m:
  5. print(m.group(1))
Success #stdin #stdout 0.04s 9652KB
stdin
Standard input is empty
stdout
1115492_23181_0_0.vcf.gz