PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
1: do not link to possible examples that cause several pages to pop up. not everyone is surfing on mozilla and other nice browsers 100% of the time.
2: do not send us places that try to reset stuff.
i'm sure that problaby stopped some ppl right there.
moving on., there's a few good books on regexp by oreilly press. if you think you're going to use them more than here, then instead of waiting for us to help you more, it's advisable that you help yourself by getting one for a reference book.
now, before we can move from waht JAM gave you, which you state has the basics of what you're looking for, we need to know what the circumstances are with expected and unexpected results. we don't need the exacts, just examples. until then the best we can do is guess that you have issues when it's not called "dir" so why not make this into a bit more of a regexp instead of a test string? (which those books would make you be able to do on your own, but for the sake of speed i'll do now)
in this case, it's using perl
% is the delimiter
i makes it case insensitive
^ means it has to start with http://
$ means it has to end with a jpg extension
\w+\. means it can have any number of characters in the range [A-Za-z0-9_] followedby a period. the first being in () with ? means this works on foo.com as well as anything one level under (ie: me.foo.com or you.foo.com)
i will exaplain more if you feel you need it. but with the repitious nature of this i feell it should be obvious
You have made hints about the content of your site. I'm not going to jump to conclusions but I would like to look into this. You have not yet pm'd me as I requested.