Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

IOPi.py line 156: model = re.match('(.*?)\\s*\\s*(.*)', line)

The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi

1502 Views - Created 05/11/2018

05/11/2018

Posted by:
KlausDerOptiker

KlausDerOptiker Avatar

IOPi.py line 156: model = re.match('(.*?)\\s*\\s*(.*)', line)

I checked this line and found out that is not working.

Correct would be:

model = re.match('(.*?)\\s*:\\s*(.*)', line)!

The difference is the ':' between '\\s*' and '\\s*'.

I checked the behavior with python 3.7 and through the page 'https://regex101.com/r/iB5dI0/7'

Regards

06/11/2018

Posted by:
KlausDerOptiker

KlausDerOptiker Avatar

In addition: same error appears of course all over the other libraries.

It seems to be that the syntax '(.*?)' of 're' needs a singular delemiter - like: 'do it until...'. An unlimited chain seems not to be allowed.

06/11/2018

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hi

Thank you for spotting the bug in the regex code. I have updated all of the python libraries with the new code so it should be working correctly now.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.