Python logo

上一主题

内置异常

下一主题

string --- Common string operations

当前页

  • 报告 Bug
  • 显示源码

导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • Python logo
  • Python »
  • 3.12.3 Documentation »
  • Python 标准库 »
  • 文本处理服务
  • |
  • |

文本处理服务¶

本章介绍的模块提供了广泛的字符串操作和其他文本处理服务。

在 二进制数据服务 之下描述的 codecs 模块也与文本处理高度相关。 此外也请参阅 Python 内置字符串类型的文档 文本序列类型 --- str。

  • string --- Common string operations
    • 字符串常量
    • 自定义字符串格式化
    • 格式字符串语法
      • 格式规格迷你语言
      • 格式示例
    • 模板字符串
    • 辅助函数
  • re --- Regular expression operations
    • 正则表达式语法
    • 模块内容
      • 标志
      • 函数
      • 异常
    • 正则表达式对象 (正则对象)
    • 匹配对象
    • 正则表达式例子
      • 检查对子
      • 模拟 scanf()
      • search() vs. match()
      • 制作一个电话本
      • 文字整理
      • 查找所有副词
      • 查找所有的副词及其位置
      • 原始字符串标记
      • 写一个词法分析器
  • difflib --- Helpers for computing deltas
    • SequenceMatcher 对象
    • SequenceMatcher 的示例
    • Differ 对象
    • Differ 示例
    • difflib 的命令行接口
    • ndiff 示例
  • textwrap --- Text wrapping and filling
  • unicodedata --- Unicode Database
  • stringprep --- Internet String Preparation
  • readline --- GNU readline interface
    • 初始化文件
    • 行缓冲区
    • 历史文件
    • 历史列表
    • 启动钩子
    • Completion
    • 示例
  • rlcompleter --- Completion function for GNU readline

上一主题

内置异常

下一主题

string --- Common string operations

当前页

  • 报告 Bug
  • 显示源码
«

导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • Python logo
  • Python »
  • 3.12.3 Documentation »
  • Python 标准库 »
  • 文本处理服务
  • |
  • |
© 版权所有 2001-2024, Python Software Foundation.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

The Python Software Foundation is a non-profit corporation. Please donate.

最后更新于 May 16, 2024 (20:10 UTC). Found a bug?
由 Sphinx 7.3.7创建。