regex on micropython 1.19 using \w #9741
Replies: 2 comments 5 replies
-
NOTE There are two backslash before the dot in the working regex. |
Beta Was this translation helpful? Give feedback.
-
While I have ho idea what your first expression should match (
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The documentation is pretty clear. \w is supported.
But this doesn't work. No re.compile error. It just doesn't find.
rDirchar = '[\\w\\._]+'
This however does work:
rDirchar =
'[A-Za-z0-9\._]+'`Note I specifically didn't use r strings i.e. r'\w'
At first I though my version was too old but I'm on a pretty recent one:
MicroPython v1.19.1-451-gbdbc44474 on 2022-09-27; linux [GCC 11.2.0] version
BTW is this even the right place to make such a post. I have a big banner warning me this is for orginization level discussions. But there's also lots of "dumb questions" like mine.
Beta Was this translation helpful? Give feedback.
All reactions