def parseString(string): rArr=[] subs=SubRipFile.from_string(string) for s in subs: text=s.text text=re.sub(fontpattern,'',text) text=re.sub(npattern,'',text) rArr.append(text) return rArr