In the django book, and on the django website, \d+ is used to capture data from the url. The syntax is never explain, nor is the importance of D or the () beyond the fact that you can specify the number of characters in that part of the url. How, exactly/in what order, are these variables passed to the function? Hoe, exactly, does the syntax work? How do you implement it? Don’t forget to explain the ()
In the django book, and on the django website, \d+ is used to capture
Share
Without further information, I’d guess it’s a regular expression (or “regex” for short). These are a common string-processing mechanism used in many programming languages. In Python they are handled with the
remodule. If you want to learn more about them you might want to check out a general regex tutorial like http://www.regular-expressions.info/.