Given the following string:
john<str> name2, doe<str> name1
where str can be string of arbitrary length
I want to select and replace '< str >' and '< str >' with an empty character, such that I get:
john name1, doe name2
I have the following:
new_string = re.sub('<.*>', '', astring, flags=re.DOTALL)
However this is giving me:
john name1