Is this the correct way to remove everything between two backward slashes?
clean = re.sub(r'\\.+?\\', '', clean)
Example input:
a\ue00f\ue010\ue011\ue012\ue013\a
Example output:
aa
Maybe split() can help here:
>>> input = r'a\ue00f\ue010\ue011\ue012\ue013\a'
>>> elems = input.split('\\')
>>> ''.join((elems[0], elems[-1]))
'aa'
\ue00fliterally that or are they Unicode characters??after the plus. Remove that and it'll be greedy.)repr()output and not understanding that the\uhhhhescape sequences are really single Unicode codepoints that are not printable. That needs to be clarified before the question is answerable.