Patrick McElhaney
- 59.6k
- 41
- 138
- 170
Are you puttingYou have to escape the character in question (–) and put a u in front of the string literal?
re to make it a unicode string.compile("–")
vs.So, for example, this:
re.compile("–")
re.compile(u"–")becomes this:
re.compile(u"\u2013")
Are you putting a u in front of the string literal?
re.compile("–")
vs.
re.compile(u"–")
You have to escape the character in question (–) and put a u in front of the string literal to make it a unicode string.
So, for example, this:
re.compile("–")
becomes this:
re.compile(u"\u2013")
Are you putting a u in front of the string literal?
re.compile("–")
vs.
re.compile(u"–")
lang-py