ValueError: Error in regex

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
gepd
Posts: 12
Joined: Sat Oct 14, 2017 8:13 pm

ValueError: Error in regex

Post by gepd » Mon Jan 22, 2018 6:23 pm

Hi, I'm trying to port a sseclient module to uPython, but I'm getting an error in a regex line:

Code: Select all

re.compile('(?P<name>[^:]*):?( ?(?P<value>.*))?')
The error is not very informative

Code: Select all

ValueError: Error in regex
Does anyone knows what is not supported by the upython module?
I didn't find an answer in the docs

I'm using the ESP-WROOM-32 module with a test board

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: ValueError: Error in regex

Post by stijn » Mon Jan 22, 2018 7:00 pm

https://docs.micropython.org/en/latest/ ... y/ure.html named capture groups are not supported

gepd
Posts: 12
Joined: Sat Oct 14, 2017 8:13 pm

Re: ValueError: Error in regex

Post by gepd » Mon Jan 22, 2018 9:32 pm

Thanks! I didn't realize I was looking the wrong version of the documentation

Post Reply