You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chapter 6 > Parameterized URL mapping section mentions that
if the URL was rango/category/python_books/ or rango/category/££££-$$$$$/ then the sequence of characters between rango/category/ and the trailing / would not match the regular expression, and a 404 not found error would result
(This line is just before info section titled Regex Hell)
This is not true in the case of path rango/category/python_books/. Accessing this page returns HTML with test "The specified category does not exist" instead of 404. It looks like the underscores are matched by regex \w as per what is mentioned on Regular-Expressions.info
\w stands for "word character". It always matches the ASCII characters [A-Za-z0-9_]. Notice the inclusion of the underscore...
The text was updated successfully, but these errors were encountered:
Hi @ProProgrammer, thanks for this. I am updating the book, and took out the first example -- which does not yield a 404 as you say. Thank you for the spot!
Chapter 6 > Parameterized URL mapping section mentions that
(This line is just before info section titled Regex Hell)
This is not true in the case of path
rango/category/python_books/
. Accessing this page returns HTML with test "The specified category does not exist" instead of 404. It looks like the underscores are matched by regex\w
as per what is mentioned on Regular-Expressions.infoThe text was updated successfully, but these errors were encountered: