Документация Python неофициальный перевод

text.md

62 строк · 6.3 КБ · обычная страница · сырой текст · скачать

1> **Источник:** https://python-all.ru/3.5/library/text.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# 6. Службы обработки текста89Модули, описанные в этой главе, предоставляют широкий набор операций по работе со строками и других служб обработки текста.1011Модуль [`codecs`](https://python-all.ru/3.5/library/codecs.html#module-codecs), описанный в разделе [Службы двоичных данных](https://python-all.ru/3.5/library/binary.html#binaryservices), также имеет прямое отношение к обработке текста. Дополнительно см. документацию по встроенному строковому типу Python в [Тип последовательности текста – str](https://python-all.ru/3.5/library/stdtypes.html#textseq).1213- [6.1. `string` – Стандартные операции со строками](https://python-all.ru/3.5/library/string.html)1415  - [6.1.1. Константы строк](https://python-all.ru/3.5/library/string.html#string-constants)16  - [6.1.2. Пользовательское форматирование строк](https://python-all.ru/3.5/library/string.html#custom-string-formatting)17  - [6.1.3. Синтаксис форматной строки](https://python-all.ru/3.5/library/string.html#format-string-syntax)1819    - [6.1.3.1. Мини-язык спецификаций формата](https://python-all.ru/3.5/library/string.html#format-specification-mini-language)20    - [6.1.3.2. Примеры форматирования](https://python-all.ru/3.5/library/string.html#format-examples)21  - [6.1.4. Шаблонные строки](https://python-all.ru/3.5/library/string.html#template-strings)22  - [6.1.5. Вспомогательные функции](https://python-all.ru/3.5/library/string.html#helper-functions)23- [6.2. `re` – Операции с регулярными выражениями](https://python-all.ru/3.5/library/re.html)2425  - [6.2.1. Синтаксис регулярных выражений](https://python-all.ru/3.5/library/re.html#regular-expression-syntax)26  - [6.2.2. Содержимое модуля](https://python-all.ru/3.5/library/re.html#module-contents)27  - [6.2.3. Объекты регулярных выражений](https://python-all.ru/3.5/library/re.html#regular-expression-objects)28  - [6.2.4. Объекты сопоставления](https://python-all.ru/3.5/library/re.html#match-objects)29  - [6.2.5. Примеры регулярных выражений](https://python-all.ru/3.5/library/re.html#regular-expression-examples)3031    - [6.2.5.1. Проверка на пару](https://python-all.ru/3.5/library/re.html#checking-for-a-pair)32    - [6.2.5.2. Имитация scanf()](https://python-all.ru/3.5/library/re.html#simulating-scanf)33    - [6.2.5.3. search() против match()](https://python-all.ru/3.5/library/re.html#search-vs-match)34    - [6.2.5.4. Создание телефонной книги](https://python-all.ru/3.5/library/re.html#making-a-phonebook)35    - [6.2.5.5. Обработка текста](https://python-all.ru/3.5/library/re.html#text-munging)36    - [6.2.5.6. Поиск всех наречий](https://python-all.ru/3.5/library/re.html#finding-all-adverbs)37    - [6.2.5.7. Поиск всех наречий и их позиций](https://python-all.ru/3.5/library/re.html#finding-all-adverbs-and-their-positions)38    - [6.2.5.8. Сырые строки](https://python-all.ru/3.5/library/re.html#raw-string-notation)39    - [6.2.5.9. Написание токенизатора](https://python-all.ru/3.5/library/re.html#writing-a-tokenizer)40- [6.3. `difflib` – Вспомогательные функции для вычисления дельт](https://python-all.ru/3.5/library/difflib.html)4142  - [6.3.1. Объекты SequenceMatcher](https://python-all.ru/3.5/library/difflib.html#sequencematcher-objects)43  - [6.3.2. Примеры SequenceMatcher](https://python-all.ru/3.5/library/difflib.html#sequencematcher-examples)44  - [6.3.3. Объекты Differ](https://python-all.ru/3.5/library/difflib.html#differ-objects)45  - [6.3.4. Пример Differ](https://python-all.ru/3.5/library/difflib.html#differ-example)46  - [6.3.5. Интерфейс командной строки для difflib](https://python-all.ru/3.5/library/difflib.html#a-command-line-interface-to-difflib)47- [6.4. `textwrap` – Перенос строк и заполнение текста](https://python-all.ru/3.5/library/textwrap.html)48- [6.5. `unicodedata` – База данных Unicode](https://python-all.ru/3.5/library/unicodedata.html)49- [6.6. `stringprep` – Подготовка интернет-строк](https://python-all.ru/3.5/library/stringprep.html)50- [6.7. `readline` – Интерфейс GNU readline](https://python-all.ru/3.5/library/readline.html)5152  - [6.7.1. Файл инициализации](https://python-all.ru/3.5/library/readline.html#init-file)53  - [6.7.2. Буфер строки](https://python-all.ru/3.5/library/readline.html#line-buffer)54  - [6.7.3. Файл истории](https://python-all.ru/3.5/library/readline.html#history-file)55  - [6.7.4. Список истории](https://python-all.ru/3.5/library/readline.html#history-list)56  - [6.7.5. Хуки запуска](https://python-all.ru/3.5/library/readline.html#startup-hooks)57  - [6.7.6. Автодополнение](https://python-all.ru/3.5/library/readline.html#completion)58  - [6.7.7. Пример](https://python-all.ru/3.5/library/readline.html#example)59- [6.8. `rlcompleter` – Функция автодополнения для GNU readline](https://python-all.ru/3.5/library/rlcompleter.html)6061  - [6.8.1. Объекты Completer](https://python-all.ru/3.5/library/rlcompleter.html#completer-objects)62