I would like to find the first occurrence of a string, after a certain other string, and between a certain pattern. The documents that I am parsing are not xml, but have similar rules of start/end. and example of what I would be looking at:
...b.filext", "{xxxxx-xxx-xxx-xxx-xxxxxxxxxxx}"
and I am trying to get the string between { and }, right after an occurrence of a vcxproj, every time it happens in the document.
I tried the following, but I get a list of None:
my_list=[]
for line in text.split('.vcxproj'):
if '{' in line:
my_list.append(re.match( r"(?<=\{)(.*?)(?=\})", line))
I have tried to alter my expression but no success. Help ? Thank you.
How about: