Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Regex to match non image urls

by muba (Priest)
on Jan 18, 2013 at 13:13 UTC ( #1014054=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Regex to match non image urls
in thread Regex to match non image urls

That said, what you are doing is conceptually broken. It is perfectly valid for an image on the web to have a URL ending with ".cgi", ".php", or even ".html". Whether something is an image or not is decided by its HTTP Content-Type header, not by the last few characters of the URL.

I couldn't agree more, sir.

That being said, I like the elegance of your code snippet.


Comment on Re^4: Regex to match non image urls

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014054]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2014-07-31 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (241 votes), past polls