Umlauts in regexp matching (via locale?)

前端 未结 2 2000
粉色の甜心
粉色の甜心 2020-12-17 19:27

I\'m surprised that I\'m not able to match a German umlaut in a regexp. I tried several approaches, most involving setting locales, but up to now to no avail.



        
2条回答
  •  庸人自扰
    2020-12-17 20:17

    In my case \S gave me better results than \w, plus saving the file as utf-8, plus using re.UNICODE

提交回复
热议问题