In this chapter, we are going to learn about text processing and regular expressions. Text processing is a process of creating or modifying the text. Python has a very powerful library called regular expressions that does tasks such as searching and extracting the data. You will learn how to do it with files and also learn to read and write to files.
We are going to learn about the re Python module for regular expressions and processing text in Python. We are going to learn about the match(), search(), findall(), and sub() functions of re module. We are also going to learn about text wrapping in Python using the textwrap module. Finally, we will learn about unicode characters.
In this chapter, we will cover the following topics:
- Text wrapping
- Regular expressions
- Unicode strings