I have an XML file which contains the following strings:
abcdef
pqrst
Seems I did it for >
:
re.sub('(?','greater than', xml_string)
? - negative lookbehind assertion,
?!
- negative lookahead assertion,
(...)(...)
is logical AND,
so whole expression means "substitute all occurences of '>' which (does not start with ' " ') and (does not start with ' "') and ( does not end with ' ')
case <
is similar