import re

title = 'hello, 你好,world'
print(title)

title = u'hello, 你好,world'
print(title)

#汉字匹配 +的意思是找到一个汉字 继续找直到找完 然后统一打印出来
#如果没有+号  则一个汉字一个汉字打印出来
pattern = re.compile(u'[\u4e00-\u9fa5]+')
s = pattern.findall(title)
print(s)

 

相关文章:

  • 2022-12-23
  • 2021-05-18
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2021-08-27
猜你喜欢
  • 2021-12-24
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-02-26
  • 2022-01-21
相关资源
相似解决方案