文本處理 (Text Processing) 服務
*******************************

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

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

* "string" --- 常見的字串操作

  * 字串常數

  * 自訂字串格式

  * 格式化文字語法

    * 格式規格 (Format Specification) 迷你語言

    * 格式範例

  * 模板字串 ($-strings)

  * 輔助函式

* "string.templatelib" --- 對模板字串字面值的支援

  * 模板字串

  * Types

  * Helper functions

* "re" --- 正規表示式 (regular expression) 操作

  * 正規表示式語法

  * 模組內容

    * 旗標

    * 函式

    * 例外

  * 正規表示式物件

  * 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

  * difflib 的命令列介面

  * ndiff 範例：

* "textwrap" --- 文字包裝與填充

* "unicodedata" --- Unicode 資料庫

* "stringprep" --- 網際網路字串的準備

* "readline" --- GNU readline 介面

  * Init file

  * Line buffer

  * History file

  * History list

  * Startup hooks

  * Completion

  * 範例

* "rlcompleter" --- GNU readline 的補全函式
