Regular expressions
The way Django matches URLs to patterns is through a regular expression. A regular expression is a sequence of characters that defines a search pattern with which we can carry out operations, such as pattern and string matching, and find/replace.
Regular expressions have a special syntax to indicate things such as digits, letters, and spaces, as well as how many times we expect a character to appear, and much more. A complete explanation of this topic is outside the scope of this book. However, it is a very important subject, so the project we're going to work on together will revolve around it, in the hope that you will be stimulated to find the time to explore it a bit more on your own.
To give you a quick example, imagine ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access