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

text.md

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

1> **Источник:** https://python-all.ru/3/library/text.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Службы обработки текста89Модули, описанные в этой главе, предоставляют широкий набор операций по работе со строками и других служб обработки текста.1011Модуль [`codecs`](https://python-all.ru/3/library/codecs.html#module-codecs), описанный в разделе [Службы двоичных данных](https://python-all.ru/3/library/binary.html#binaryservices), также имеет прямое отношение к обработке текста. Дополнительно см. документацию по встроенному строковому типу Python в [Тип последовательности текста – str](https://python-all.ru/3/library/stdtypes.html#textseq).1213- [`string` – Общие операции со строками](https://python-all.ru/3/library/string.html)1415  - [Строковые константы](https://python-all.ru/3/library/string.html#string-constants)16  - [Пользовательское форматирование строк](https://python-all.ru/3/library/string.html#custom-string-formatting)17  - [Синтаксис форматных строк](https://python-all.ru/3/library/string.html#format-string-syntax)1819    - [Мини-язык спецификации формата](https://python-all.ru/3/library/string.html#format-specification-mini-language)20    - [Примеры форматирования](https://python-all.ru/3/library/string.html#format-examples)21  - [Строки-шаблоны ($-strings)](https://python-all.ru/3/library/string.html#template-strings-strings)22  - [Вспомогательные функции](https://python-all.ru/3/library/string.html#helper-functions)23- [`string.templatelib` – Поддержка шаблонных строковых литералов](https://python-all.ru/3/library/string.templatelib.html)2425  - [Строки-шаблоны](https://python-all.ru/3/library/string.templatelib.html#template-strings)26  - [Типы](https://python-all.ru/3/library/string.templatelib.html#types)27  - [Вспомогательные функции](https://python-all.ru/3/library/string.templatelib.html#helper-functions)28- [`re` – Операции с регулярными выражениями](https://python-all.ru/3/library/re.html)2930  - [Синтаксис регулярных выражений](https://python-all.ru/3/library/re.html#regular-expression-syntax)31  - [Содержимое модуля](https://python-all.ru/3/library/re.html#module-contents)3233    - [Флаги](https://python-all.ru/3/library/re.html#flags)34    - [Функции](https://python-all.ru/3/library/re.html#functions)35    - [Исключения](https://python-all.ru/3/library/re.html#exceptions)36  - [Объекты регулярных выражений](https://python-all.ru/3/library/re.html#regular-expression-objects)37  - [Объекты Match](https://python-all.ru/3/library/re.html#match-objects)38  - [Примеры регулярных выражений](https://python-all.ru/3/library/re.html#regular-expression-examples)3940    - [Проверка на пару](https://python-all.ru/3/library/re.html#checking-for-a-pair)41    - [Имитация scanf()](https://python-all.ru/3/library/re.html#simulating-scanf)42    - [search() и match()](https://python-all.ru/3/library/re.html#search-vs-match)43    - [Создание телефонного справочника](https://python-all.ru/3/library/re.html#making-a-phonebook)44    - [Преобразование текста](https://python-all.ru/3/library/re.html#text-munging)45    - [Поиск всех наречий](https://python-all.ru/3/library/re.html#finding-all-adverbs)46    - [Поиск всех наречий и их позиций](https://python-all.ru/3/library/re.html#finding-all-adverbs-and-their-positions)47    - [Сырая строковая нотация](https://python-all.ru/3/library/re.html#raw-string-notation)48    - [Написание токенизатора](https://python-all.ru/3/library/re.html#writing-a-tokenizer)49- [`difflib` – Вспомогательные функции для вычисления разностей](https://python-all.ru/3/library/difflib.html)5051  - [Объекты SequenceMatcher](https://python-all.ru/3/library/difflib.html#sequencematcher-objects)52  - [Примеры SequenceMatcher](https://python-all.ru/3/library/difflib.html#sequencematcher-examples)53  - [Объекты Differ](https://python-all.ru/3/library/difflib.html#differ-objects)54  - [Пример Differ](https://python-all.ru/3/library/difflib.html#differ-example)55  - [Интерфейс командной строки для difflib](https://python-all.ru/3/library/difflib.html#a-command-line-interface-to-difflib)56  - [Пример ndiff](https://python-all.ru/3/library/difflib.html#ndiff-example)57- [`textwrap` – Перенос и заполнение текста](https://python-all.ru/3/library/textwrap.html)58- [`unicodedata` – База данных Unicode](https://python-all.ru/3/library/unicodedata.html)59- [`stringprep` – Подготовка строк для интернета](https://python-all.ru/3/library/stringprep.html)60- [`readline` – Интерфейс GNU readline](https://python-all.ru/3/library/readline.html)6162  - [Файл инициализации](https://python-all.ru/3/library/readline.html#init-file)63  - [Буфер строки](https://python-all.ru/3/library/readline.html#line-buffer)64  - [Файл истории](https://python-all.ru/3/library/readline.html#history-file)65  - [Список истории](https://python-all.ru/3/library/readline.html#history-list)66  - [Перехватчики запуска](https://python-all.ru/3/library/readline.html#startup-hooks)67  - [Автодополнение](https://python-all.ru/3/library/readline.html#completion)68  - [Пример](https://python-all.ru/3/library/readline.html#example)69- [`rlcompleter` – Функция автодополнения для GNU readline](https://python-all.ru/3/library/rlcompleter.html)70