##language:zh ::-- ZoomQuiet [<>] '''Unicode in Python''' === Unicode 字串 === ''Unicode Strings in Python'' === 标准库的Unicode 支持 === ''Unicode Support in the Python Standard Library'' === Unicode编码的文件 === ''Unicode files and Python'' === 输出Unicode字串 === ''print and Unicode strings'' === Unicode和正则表达式 === ''Python-cn 列表中讨论得来'' {{{发件人: cpunion 回复: python-chinese@lists.python.cn 收件人: python-chinese@lists.python.cn 日期: 2005-5-27 上午10:09 主题: Re: [python-chinese] 关于python正则表达式 的一个问题 }}} * 多字节文字一定要用unicode处理,先遵守这一点,再去做其它的。 {{{#!python a = unicode ("""随着信息技术的发展,计算机应用渗透到社会生活的各个领域,特 别是在电子商务中的应用,使人们对信息的依赖程度越来越大,从而使信息安全技 术显得格外重要。信息安全技术主要是研究计算机系统信息的机密性、完整性、可 获取性和真实性,它的核心是加密技术。加密技术根据加密密钥与解密密钥是否相 同可分为对称加密技术(单密钥加密技术)和非对称加密技术(公开密钥加密技 术)。加个叹号!加个问号?试试句号加引号。“试试叹号加引号!”。“试试问号 加引号?” 加点废话""" , "utf-8") expression = unicode ("。|!|?|。”|!”|?", "utf-8") import re listSentence = re.split (expression, a) for i in listSentence: print i }}} * 的确如此! * '''PyRegularExpression -- Python 的正则表达式'''