I am trying to parse through various strings that look like this
cpd00015_c + cpd00041_c + cpd00095_c --> 2.0 cpd00001_c + cpd00009_c + cpd00067_c
Right now I have code that finds the first instance, but I want to find all the instances of these.
try:
found = re.search('cpd(.+?)_c', reactionEquation).group(1)
print(found)
except AttributeError:
# AAA, ZZZ not found in the original string
pass # apply your error handling
the re.search function only finds the first instance of this. Is there a research for multiple strings that you don't fully know the name of?