A brief introduction to regexes
A regular expression (usually shortened to regex) is defined by a series of characters that identify an abstract search pattern. Essentially, it is a mathematical technique that was developed in 1951 by experts of formal language and theoretical computer science. It is used to validate input data or to search for and extract information from texts.
If you don't know the syntax of a regex, at first glance, it might look really tricky:
Fortunately, there are online regex visualization tools that make it easier to understand patterns (you can find one of them at https://regexper.com). For example, the regex highlighted in Figure 5.1 can be visualized as follows:
From Figure 5.2, we can see that the regex in Figure 5.1 will identify email addresses in a piece of text.
Learning how to use regexes like...