If you use the following Regular Expression, it should help:
(?<=\w*)\d+(?=.log)
Now, you weren't specific about the rules, but here are my assumptions:
The first part of the file name must be a sequence of 0 or more word
characters.
The second part is a sequence of 1 or more digits.
The third part is the extension ".log"
This regular expression uses a positive look-ahead and a negative
look-behind to assert that the numbers are part of a file name without
capturing the rest of the file name. Once you have the numbers, you convert
them to integers and compare.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
"Stevie" <st**********@hotmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Hello
I'm trying to work out the regular expression for carrying out a simple
'greater than' comparison.
I have a directory with files such as asd345.log, asd346.log,
asd347.log and so on.
The regex is to be using in a find command, which should return a list
of files whose numeric portion is greater than, say, 346. In the
example above this would return one file name, asd347.log.
Thanks for any help
Stevie