It turns out that most regex flavours don’t consider letters like æøå to be actual letters. Shortcuts like \w is predicated on the ASCII set, not Unicode. Except the Python regex engine does handle Unicode also. And I grew up on Python so I had never run into this issue before. I specifically ran into it in Amazon Sagemaker Data Wrangler where it stripped out some characters that I didn’t expect and then I was freaking out that my code might have been bollocks. But my code is Python and it’s fine. Data Wrangler seems to run on Spark so maybe it’s the Scala / Java regex flavour? Dunno.












