Page 1 of 1

Gallery help

Posted: Thu Jan 02, 2014 3:14 pm
by RZ77
Trying to build a simple gallery for the following example where the name has different chars at the end. I want to get all of the items.

example.nnn/picture100/picture100ab.jpg
example.nnn/picture100/picture100cd-1.jpg
example.nnn/picture100/picture100cd-2.jpg etc.

I can use the following but I don't know how to include both items with different chars at the end of the name.

example.nnn/picture100/picture[100-100][ab-cd]-[1-7;1].jpg

This does not work.

Is there any way to use a wildcard or a way to use a variable to get picture100ab and picture100cd?

I appreciate any help.

Re: Gallery help

Posted: Fri Jan 03, 2014 12:54 am
by Thrawn
I'm not sure what site you're at, so I can't test properly, but how about this?

Code: Select all

example.nnn/picture100/picture100[a-z;1][a-z;1]-[1-7;1].jpg

Re: Gallery help

Posted: Fri Jan 03, 2014 12:59 am
by therube
Neat.
Never knew you could do that with alpha's.

Not sure, but thinking he only wants 'ab' & 'cd'? What you have will work, only it will attempt a lot of dead ends.

Re: Gallery help

Posted: Fri Jan 03, 2014 1:40 am
by Thrawn
Well, to just have 'ab' and 'cd', you'd have to have something like [ab-cd;54], I think, to make a single very big step from one to the other.

Or perhaps [a-c;2][b-d;2], which will try:
ab
cb
ad
cd

Re: Gallery help

Posted: Sat Jan 04, 2014 1:10 pm
by RZ77
Thank You Thrawn and therube.

I really appreciate your help.

This works and gets all items successfully except picture100cd.jpg

example.nnn/picture100/picture100ab-[1-7;1].jpg

It is really like two queries one with the 1 through 7 and one without.

example.nnn/picture100/picture100ab.jpg
example.nnn/picture100/picture100cd-1.jpg

It just may not be able to it. I'll keep trying.

Thanks

Re: Gallery help

Posted: Mon Jan 06, 2014 3:51 am
by Thrawn
Yeah, you'll probably need a second query for that, I'm afraid, because it isn't really the same structure as the numbered ones.