fork(7) download
  1. import re
  2. s = "abcde\n fghij<FooBar>";
  3. rx = r"(.*)<FooBar>";
  4. m = re.search(rx, s, flags=re.S)
  5. if m:
  6. print(m.group(1))
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
abcde
		fghij