ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](string.xhtml "string --- 常见的字符串操作") | - [上一页](exceptions.xhtml "内置异常") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | # 文本处理服务 本章介绍的模块提供了广泛的字符串操作和其他文本处理服务。 在 [二进制数据服务](binary.xhtml#binaryservices) 之下描述的 [`codecs`](codecs.xhtml#module-codecs "codecs: Encode and decode data and streams.") 模块也与文本处理高度相关。 此外也请参阅 Python 内置字符串类型的文档 [文本序列类型 --- str](stdtypes.xhtml#textseq)。 - [`string` --- 常见的字符串操作](string.xhtml) - [字符串常量](string.xhtml#string-constants) - [自定义字符串格式](string.xhtml#custom-string-formatting) - [格式字符串语法](string.xhtml#format-string-syntax) - [Format Specification Mini-Language](string.xhtml#format-specification-mini-language) - [Format examples](string.xhtml#format-examples) - [Template strings](string.xhtml#template-strings) - [Helper functions](string.xhtml#helper-functions) - [`re` --- 正则表达式操作](re.xhtml) - [正则表达式语法](re.xhtml#regular-expression-syntax) - [模块内容](re.xhtml#module-contents) - [正则表达式对象 (正则对象)](re.xhtml#regular-expression-objects) - [匹配对象](re.xhtml#match-objects) - [正则表达式例子](re.xhtml#regular-expression-examples) - [检查对子](re.xhtml#checking-for-a-pair) - [模拟 scanf()](re.xhtml#simulating-scanf) - [search() vs. match()](re.xhtml#search-vs-match) - [建立一个电话本](re.xhtml#making-a-phonebook) - [文字整理](re.xhtml#text-munging) - [找到所有副词](re.xhtml#finding-all-adverbs) - [找到所有副词和位置](re.xhtml#finding-all-adverbs-and-their-positions) - [原始字符记法](re.xhtml#raw-string-notation) - [写一个词法分析器](re.xhtml#writing-a-tokenizer) - [模块 difflib 是一个计算差异的助手](difflib.xhtml) - [SequenceMatcher Objects](difflib.xhtml#sequencematcher-objects) - [序列匹配的示例](difflib.xhtml#sequencematcher-examples) - [Differ Objects](difflib.xhtml#differ-objects) - [Differ Example](difflib.xhtml#differ-example) - [A command-line interface to difflib](difflib.xhtml#a-command-line-interface-to-difflib) - [`textwrap` --- Text wrapping and filling](textwrap.xhtml) - [`unicodedata` --- Unicode 数据库](unicodedata.xhtml) - [`stringprep` --- Internet String Preparation](stringprep.xhtml) - [`readline` --- GNU readline interface](readline.xhtml) - [Init file](readline.xhtml#init-file) - [Line buffer](readline.xhtml#line-buffer) - [History file](readline.xhtml#history-file) - [History list](readline.xhtml#history-list) - [Startup hooks](readline.xhtml#startup-hooks) - [Completion](readline.xhtml#completion) - [示例](readline.xhtml#example) - [`rlcompleter` --- GNU readline的完成函数](rlcompleter.xhtml) - [Completer对象](rlcompleter.xhtml#completer-objects) ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](string.xhtml "string --- 常见的字符串操作") | - [上一页](exceptions.xhtml "内置异常") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | © [版权所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。