Community Forum Share your projects and post your questions

Register or Sign In

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

52 Views - Created 35 days ago

35 days ago

Posted by:
KlausDerOptiker

Users 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

34 days ago

Posted by:
KlausDerOptiker

Users 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.

34 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users 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.

AB Electronics UK Tech Support

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.