[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python3, regular expression and bytes text

Am Sonntag, 13. Oktober 2019 21:20:26 UTC+2 schrieb moi:
> [Do not know why I spent hours with this...]
> To answer you question. 
> Yes, I confirm.
> It seems that as soon as one works with bytes and when
> a char is encoded in more than 1 byte, "re" goes into
> troubles.

First, sorry for answering so late but I double checked my mail inbox and there is no notification that you have answered, whereas I got a notification for each of the other posts. Not sure what happened.
Thx for confirmation.

> Something else.
> I do not like to use "\w". One can rapidly be confronted with
> annoying boundary limits. A while loop can be much more "fine
> grained" and it works with everything, bytes, encoded chars,
> code points...

As the whole idea is, maybe I should use "was" by now, 
to build a regex tester script, it seems to be logical to use
regular expressions, isn't it. :-)