I'm looking for items in a directory that have 5 numeric numbers, 1-9.They need to be jpg files. At times it might be 7 numbers that also contain alpha characters. For this requirment it can not have alpha characters after the 5 numbers. 12345f.jpg would not be needed.
Would Work
324562.jpg
765344.jpg
213213.jpg
Some Times I would want, at different timers, 342344h.jpg. My problem is I don't know how to call for a number or alpha characters, don't know the rules. I was thinking #####.jpg would give me only 232344.jpg, numbers.
I read the filter help which has a lot of good ideas. I just could not find the right help. I was hoping to find a way to control the filter alpha & number, placement.
In your first post you state you want to match 5 numeric characters, then you start trying to match 6. What are you really looking for?
Anyway
^([a-z]{2})?\d{5}\....
^ = pattern must match from the beginning of the filename
([a-z]{2})? = 2 NON digits (not necessarily alpha characters - the ? means may or may not be present
\d{5} = \d = digits - {5} means min of 5, max of 5 ({1,3} would match one to three, {5,} means five or more)
Since I'm looking for 0-9 only I would think I would not use A-Z. I know {2} is most likely a value of 2, and I'm looking for 6. And since I only want jpg files this is my thought, based on what I get from example:
{{6}}.jpg
Which did not work. I must be missing something. I believe your example is based on alpha. I'm looking for numeric values. And if I'm right I don't know the symble for the numeric values I need.
Since I'm looking for 0-9 only I would think I would not use A-Z.[/quote]But originally you stated "At times it might be 7 numbers that also contain alpha characters" (which I misread as 2 alpha followed by 5 numerics.)
The explanation above points out the "?" character at the end of the "([a-z]{2})?" and its meaning.
"[0-9]{6}" is looking for 6 numeric digits. (Or \d{6})
/s matches a space (so does "[:space:]". In a character class such as "[0-9a-z ]" a space actually matches a space
Thanks for the help. I purchased the RegexBuddy and with a little luck I might figure out how to filter Dopus. You would think a filter would be easy. But than it is very powerful.