I need to implement the following:
Input: type1("s df") type2("df g") type3("ds ff d") type4("fdgfg")
I need to extract the patterns type1(.*), type2(.*), type3(.*), and type4(.*), in the same order as they are found in the input and store them in an array. ( I have exactly 4 types)
I read about re.split, re.match, re.search, etc. But, I don't think I can use any of them to achieve my goal.
Please tell me how I must approach this.