MicroWebSrv2 icon indicating copy to clipboard operation
MicroWebSrv2 copied to clipboard

Makes the route resolver pattern compatible with MicroPython's re

Open Gattag opened this issue 3 years ago • 4 comments

MicroPython does not support named classes within [...] (i.e. no [\\w] or [\\s] )

Fixes #38

Gattag avatar Apr 10 '21 01:04 Gattag

Was just going to PR for the same problem...

However I don't understand [\w.]. Since . matches anything, what's is \w doing? Doubtless something as I've no great experience with re.

2e0byo avatar Sep 12 '21 18:09 2e0byo

However I don't understand [\w.]. Since . matches anything, what's is \w doing? Doubtless something as I've no great experience with re.

When . is inside a character class [...], it not longer matches anything and only matches the literal . character

Gattag avatar Sep 13 '21 19:09 Gattag

works fine, thank you

tf131 avatar Sep 22 '21 12:09 tf131

However I don't understand [\w.]. Since . matches anything, what's is \w doing? Doubtless something as I've no great experience with re.

When . is inside a character class [...], it not longer matches anything and only matches the literal . character

Duh! Thank you. I was being daft.

2e0byo avatar Sep 22 '21 16:09 2e0byo