I have a text file that has the following info:
"Where_can_i_find red capture state"
"Why_are_you orange 00:AO state"
"Salty_pepper gray good state"
with open(cur_path,'r') as file:
data = file.read()
itm1 = re.search('Where_can_i_find (.+?)state',data.group(1)
itm2 = re.search('Salty_pepper (.+?)state',data.group(1)
This will give me red capture and gray good etc...But I only want to get capture for the first item and good for the second item without the red and gray part. In other words I want to skip everything on the 2nd column.
How should I change my regex for this to work?