re.findall(r'\w+', ip, re.UNICODE)
# EDIT
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.findall(r"\w+", u"Fältskog", re.UNICODE)
[u'F\xe4ltskog']
>>>
您需要设置appropriateflags(在本例中,^{} 告诉
re
什么是\w
):在关于芬德尔(r'[å2019;Ä201; \w]+',ip)
你也可以这样做,如果你想更直观。在
相关问题 更多 >
编程相关推荐