PyCharm thinks this RegExp has Duplicate character is characte class. Is it bug or not?

pycharm, python, python-3.x, regex, unicode

Solution

This was known bug. It was closed in 2020-09.

Problem

``` # Python3 r = re.compile(r"[\U0001f570\U0001f573\U0001f57a]") ``` This RegExp should find one of three emoji. Everything works correct, but PyCharm says: "Duplicate character \U0001f573 inside character class" "Duplicate character \U0001f57a inside character class" If I change order, it says the same about 2nd and 3rd symbols, but never says about 1st one. Is it a bug in PyCharm (maybe about about unicode surrogate pairs) or there is really something wrong with my RegExp? UPDATE: Screenshot to be sure you get me right.

Original source