Hi
How can one escape the "\" character?
Escaping the "^" character works fine
Hi
discovered the answer here
How can one escape the "\" character?
Escaping the "^" character works fine
>>> import re >>> re.findall(re.escape("^"), "^hello^") ['^', '^']But when escaping the "\" character I get an error:
>>> re.findall(re.escape("\"), "\hello\") File "<stdin>", line 1 re.findall(re.escape("\"), "\hello\")Thanks
Hi
discovered the answer here