I am trying to us python re to split strings on multiple delimiters, but it screams about my escaped backslash character.
I am not sure what to change as when I looked for escaping backslash in python, this is what I was shown is correct...
import re
def get_asset_str(in_str):
split = re.split(' |/|\\' , in_str)
Traceback (most recent call last):
File "AssetCheck.py", line 15, in <module>
get_asset_str(line)
File "AssetCheck.py", line 4, in get_asset_str
split = re.split(' |/|\\' , in_str)
File "C:\Python27\lib\re.py", line 167, in split
return _compile(pattern, flags).split(string, maxsplit)
File "C:\Python27\lib\re.py", line 244, in _compile
raise error, v # invalid expression
sre_constants.error: bogus escape (end of line)