I'm parsing an XML file and need to remove some clutter from the final output.
str = <?xml version="1.0" encoding="UTF-8" standalone="yes"?><chat-message>2018-10
my attempt at a solution is:
re.sub(r'<(\w|\d|\s){1,}>{1,4}',"",str)
and my desired output is:
2018-10
Currently Python is finding no matches and just returning str. I don't think < or > are special characters so no escaping needed; I tried escaping anyway and it still did not work.