fork download
  1. import re
  2. strng ="Fiscal Year Ended March 31, 2018 Total Year (in $000's) and Another Fiscal Year Ended May 31, 2019 Total Year (in $000's)"
  3. print(re.findall(r"\b20[012]\d\b",strng))
  4. print(" ".join(re.split(r"\b20[012]\d\b",strng)))
Success #stdin #stdout 0.02s 27728KB
stdin
Standard input is empty
stdout
['2018', '2019']
Fiscal Year Ended March 31,   Total Year (in $000's) and Another Fiscal Year Ended May 31,   Total Year (in $000's)