The regex on page 48 is hard to read:
~r/(^https:\/\/|\/images\/).+(\.png|\.jpg)$/
It can be improved by changing the delimiters which means that you don’t have to escape all the forward slashes. Like so:
~r"(^https://|/images/).+(\.png|\.jpg)$"
The regex on page 48 is hard to read:
~r/(^https:\/\/|\/images\/).+(\.png|\.jpg)$/
It can be improved by changing the delimiters which means that you don’t have to escape all the forward slashes. Like so:
~r"(^https://|/images/).+(\.png|\.jpg)$"
Oh that’s a great idea! Thank you, we’ll do that