[go: up one dir, main page]

Python logo

上個主題

內建的例外

下個主題

string --- 常見的字串操作

此頁面

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.13.3 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • 文本處理 (Text Processing) 服務
  • |
  • |

文本處理 (Text Processing) 服務¶

本章節介紹的模組 (module) 提供了廣泛的字串操作與其他文本處理服務。

在 二進位資料服務 下所描述的 codecs 模組也與文本處理高度相關。另外也請參閱在 Text Sequence Type --- str 中所描述的 Python 內建字串型別。

  • string --- 常見的字串操作
    • 字串常數
    • 自訂字串格式
    • 格式化文字語法
      • 格式規格 (Format Specification) 迷你語言
      • 格式範例
    • 模板字串
    • 輔助函式
  • re --- 正規表示式 (regular expression) 操作
    • 正規表示式語法
    • 模組內容
      • 旗標
      • 函式
      • 例外
    • Regular Expression Objects
    • Match Objects
    • Regular Expression Examples
      • Checking for a Pair
      • 模擬 scanf()
      • search() vs. match()
      • Making a Phonebook
      • Text Munging
      • Finding all Adverbs
      • Finding all Adverbs and their Positions
      • Raw String Notation
      • Writing a Tokenizer
  • difflib --- 計算差異的輔助工具
    • SequenceMatcher 物件
    • SequenceMatcher 範例
    • Differ Objects
    • Differ Example
    • A command-line interface to difflib
    • ndiff 範例:
  • textwrap --- 文字包裝與填充
  • unicodedata --- Unicode 資料庫
  • stringprep --- 網際網路字串的準備
  • readline --- GNU readline 介面
    • Init file
    • Line buffer
    • History file
    • History list
    • Startup hooks
    • Completion
    • 範例
  • rlcompleter --- GNU readline 的補全函式

上個主題

內建的例外

下個主題

string --- 常見的字串操作

此頁面

  • 回報錯誤
  • 顯示原始碼
«

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.13.3 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • 文本處理 (Text Processing) 服務
  • |
  • |
© 版權 2001-2025, 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.

最後更新於 5月 20, 2025 (03:13 UTC)。 Found a bug?
使用 Sphinx 8.2.3 建立。