A
A
Alexander2017-05-08 08:29:39
Python
Alexander, 2017-05-08 08:29:39

Why does PyCharm consider this RegExp invalid?

# Python3
r = re.compile(r"[\U0001f570\U0001f573\U0001f57a]")

15dac465a01c4322af65cc89a3c9afe6.png
It seems to me that this is a bug of PyCharm itself, in which Unicode surrogate pairs are somehow involved.
UPDATE1: The code is working. It's just the warning that annoys me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-05-11
@Survtur

Still a PyCharm bug. Bug report sent. https://youtrack.jetbrains.com/issue/PY-24172

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question