Quote:
Originally posted by Lane
your code assumes there is at most 1 image url per line, and the regular expression has redundant code.
correct me if i'm wrong.
|
Thanks for pointing that out.. it's true I didn't think of that.
And looking carefully you should shorten the pattern from this:
/href=[\"|']([^\"|']+.jpg)|([^\"|']+.jpeg)/
To
/href=[\"|']([^\"|']+[.jpg|.jpeg])/
Is that what you had in mind when you said redundant code?