Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: very quick link regex

by varian (Chaplain)
on Aug 03, 2007 at 07:40 UTC ( [id://630464]=note: print w/replies, xml ) Need Help??


in reply to Re: very quick link regex
in thread very quick link regex

You were very close to result already.
/(.+)+\.jpg
In this last part of your regexp the dot-plus will match all up to the end of line. The remaining '.jpg' part will not be found and therefore the regexp never matches.

The solution is to make the dot-plus part of the regexp less greedy, change the part above to:

/(.+?)\.jpg

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 18:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found