This is my string:
raw_list = u\'Software Engineer with a huge passion for new and innovative products. Experienced gained from working in both big and fast-grow
You're using a raw string, with the r
. That tells Python to interpret the string literally, instead of actually taking escaped characters (such as \n).
>>> r'\u2022'
'\\u2022'
You can see it's actually a double backslash. Instead you want to use >>> u'\u2022'
and then it will work.
Note that since you're doing a simple replacement you can just use the str.replace
method:
x = raw_list.replace(u'\u2022', ' ')
You only need a regex replace for complicated pattern matching.