I'm looking for a way to extract the information between the tags for a python script I'm working on. I've been able to use regex testers to isolate the piece that I want, but the re.search method doesn't work in my code. I'm limited to using the re.sub method along with split to get the information I'm after.
I've tried using re.search and it returns an error, so I've been using the re.sub method instead
sub = re.sub('<.*?>',' ', line)
sub = sub.split()
sample string:
<CellValue Index="0"><FormattedValue>System Managed Accounts
Group</FormattedValue><Value>System Managed Accounts Group</Value>
</CellValue>
The above function is yielding the data from the right place, but is not returning all the info (it stops at the first space, how can I modify it to get the entirety of the text between the tags)