【发布时间】:2015-12-07 00:36:59
【问题描述】:
Python re 模块的 documentation 表示,当设置 re.UNICODE 标志时,'\s' 将匹配:
在 Unicode 字符属性数据库中归类为空格的任何内容。
据我所知,BOM (U+FEFF) 是classified as a space。
但是:
re.match(u'\s', u'\ufeff', re.UNICODE)
评估为None。
这是 Python 中的错误还是我遗漏了什么?
【问题讨论】: