fork(1) download
  1. import re
  2. regex = r"(?m)^Review frequency[ \t]+([Qq]uarterly|(?:[Ss]emi-)?[Aa]nnually)[ \t]+(.*)"
  3. test = "No. of components Variable\nReview frequency Quarterly (Mar., Jun., Sep., Dec.\nQuick facts\nTo learn more about the"
  4. print(re.findall(regex, test))
Success #stdin #stdout 0.01s 9024KB
stdin
Standard input is empty
stdout
[('Quarterly', '(Mar., Jun., Sep., Dec.')]