View Single Post
Old 12-11-2024, 01:47 PM   #264
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,883
Karma: 6120478
Join Date: Nov 2009
Device: many
But according to the python module regex (?i) is a scoped flag not a global flag. Which is why the regex module works with no pattern change required.

It is only the internal python module re that seems to think (?i) is a global flag.

I am not sure which of the two is even correct. But the more I think about it ...
you should be able to turn on ignore case, and back to fullcase inside any pattern so I think regex is correct here and the python module re is incorrect.

ignore case should be a scoped flag. So this is either a bug in the internal python module re or a limitation that is not documented.

Last edited by KevinH; 12-11-2024 at 01:55 PM.
KevinH is offline   Reply With Quote