Unresolved reference 'match'

Hi, hope you are well!
I just started python and have some problem with match statement. I have python 3.11 and am using PyCharm 2023.3.2 (Community Edition)

As i understood match statement should be an integrated part for Python 3.11 and I have it when I use IDLE from my downloaded python folder, but when I use PyCharm I alway get “unresolved reference ‘match’” error.
Tried to change interpreter to anaconda3 and back to python 3.11 but nothing changes…
if anyone had similar problem or have some advice, would appreciate it very much!

All the best from Croatia!

Hi !

I assume you are getting this error from the code inspector (i.e. your code is highlighted/underlined in red) ? Have you tried running the code to check if it throws any error ?

I suspect that the interpreter is Python 3.11 as expected, but that PyCharms’s code inspector is not configured for Python 3.11. This can be changed in Settings | Editor | Inspections | Python | Code is incompatible with specific Python versions.

Noob to Python here.

Please note that re.match() matches from beginning of string only. In most cases you want to use re.search() which makes a match anywhere in the string.

See docs at Regular Expression HOWTO — Python 3.12.1 documentation