September 2026
1051 pages
35h 4m
English
So far, the syntax of regular expressions and their use by the re module of the standard library have been discussed. At this point, we’ll present two more small sample projects that focus on the use of regular expressions. First, we’ll explain searching in a simple example; we’ll cover matching in the subsequent, more complex example.
Searching is used to find and filter out patterns within a longer text. In our sample program, searching is intended to retrieve all links from any HTML file along with their description. To do this, you must first visualize the structure of an HTML link:
<a href="URL">description</a>
Because HTML is not case-sensitive, we should use the regular expression with the ...
Read now
Unlock full access