rep*_*man 6 python regex unicode case-insensitive character-properties
假设我想匹配一个小写字母后跟一个大写字母,我可以做类似的事情
re.compile(r"[a-z][A-Z]")
Run Code Online (Sandbox Code Playgroud)
现在我想对unicode字符串做同样的事情,即匹配'aÅ'或'yÜ'之类的东西.
试着
re.compile(r"[a-z][A-Z]", re.UNICODE)
Run Code Online (Sandbox Code Playgroud)
但这不起作用.
有线索吗?