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

text.md

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

1> **Источник:** https://python-all.ru/3.3/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.3/library/codecs.html#module-codecs), описанный в разделе [*Binary Data Services*](https://python-all.ru/3.3/library/binary.html#binaryservices), также имеет прямое отношение к обработке текста. Кроме того, см. документацию встроенного строкового типа Python в разделе [*Text Sequence Type – str*](https://python-all.ru/3.3/library/stdtypes.html#textseq).1213- [6.1. `string` – Распространённые операции со строками](https://python-all.ru/3.3/library/string.html)1415  - [6.1.1. Константы строк](https://python-all.ru/3.3/library/string.html#string-constants)16  - [6.1.2. Форматирование строк](https://python-all.ru/3.3/library/string.html#string-formatting)17  - [6.1.3. Синтаксис форматной строки](https://python-all.ru/3.3/library/string.html#format-string-syntax)1819    - [6.1.3.1. Мини-язык спецификаций формата](https://python-all.ru/3.3/library/string.html#format-specification-mini-language)20    - [6.1.3.2. Примеры форматирования](https://python-all.ru/3.3/library/string.html#format-examples)21  - [6.1.4. Шаблонные строки](https://python-all.ru/3.3/library/string.html#template-strings)22  - [6.1.5. Вспомогательные функции](https://python-all.ru/3.3/library/string.html#helper-functions)23- [6.2. `re` – Операции с регулярными выражениями](https://python-all.ru/3.3/library/re.html)2425  - [6.2.1. Синтаксис регулярных выражений](https://python-all.ru/3.3/library/re.html#regular-expression-syntax)26  - [6.2.2. Содержимое модуля](https://python-all.ru/3.3/library/re.html#module-contents)27  - [6.2.3. Объекты регулярных выражений](https://python-all.ru/3.3/library/re.html#regular-expression-objects)28  - [6.2.4. Объекты сопоставления](https://python-all.ru/3.3/library/re.html#match-objects)29  - [6.2.5. Примеры регулярных выражений](https://python-all.ru/3.3/library/re.html#regular-expression-examples)3031    - [6.2.5.1. Проверка на пару](https://python-all.ru/3.3/library/re.html#checking-for-a-pair)32    - [6.2.5.2. Имитация scanf()](https://python-all.ru/3.3/library/re.html#simulating-scanf)33    - [6.2.5.3. search() против match()](https://python-all.ru/3.3/library/re.html#search-vs-match)34    - [6.2.5.4. Создание телефонной книги](https://python-all.ru/3.3/library/re.html#making-a-phonebook)35    - [6.2.5.5. Обработка текста](https://python-all.ru/3.3/library/re.html#text-munging)36    - [6.2.5.6. Поиск всех наречий](https://python-all.ru/3.3/library/re.html#finding-all-adverbs)37    - [6.2.5.7. Поиск всех наречий и их позиций](https://python-all.ru/3.3/library/re.html#finding-all-adverbs-and-their-positions)38    - [6.2.5.8. Сырые строки](https://python-all.ru/3.3/library/re.html#raw-string-notation)39    - [6.2.5.9. Написание токенизатора](https://python-all.ru/3.3/library/re.html#writing-a-tokenizer)40- [6.3. `difflib` – Вспомогательные средства для вычисления различий](https://python-all.ru/3.3/library/difflib.html)4142  - [6.3.1. Объекты SequenceMatcher](https://python-all.ru/3.3/library/difflib.html#sequencematcher-objects)43  - [6.3.2. Примеры SequenceMatcher](https://python-all.ru/3.3/library/difflib.html#sequencematcher-examples)44  - [6.3.3. Объекты Differ](https://python-all.ru/3.3/library/difflib.html#differ-objects)45  - [6.3.4. Пример Differ](https://python-all.ru/3.3/library/difflib.html#differ-example)46  - [6.3.5. Интерфейс командной строки для difflib](https://python-all.ru/3.3/library/difflib.html#a-command-line-interface-to-difflib)47- [6.4. `textwrap` – Перенос и заполнение текста](https://python-all.ru/3.3/library/textwrap.html)48- [6.5. `unicodedata` – База данных Unicode](https://python-all.ru/3.3/library/unicodedata.html)49- [6.6. `stringprep` – Подготовка интернет-строк](https://python-all.ru/3.3/library/stringprep.html)50- [6.7. `readline` – Интерфейс GNU readline](https://python-all.ru/3.3/library/readline.html)5152  - [6.7.1. Пример](https://python-all.ru/3.3/library/readline.html#example)53- [6.8. `rlcompleter` – Функция дополнения для GNU readline](https://python-all.ru/3.3/library/rlcompleter.html)5455  - [6.8.1. Объекты Completer](https://python-all.ru/3.3/library/rlcompleter.html#completer-objects)56