Find files between a number range

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
AnthonyCian
Senior Member
Senior Member
Posts: 265
Joined: 2005-06-16, 01:45 UTC
Location: Thatcher Az. USA

Find files between a number range

Post by *AnthonyCian »

Is it possible to find files that begin with numbers?
Example: 0001typerun_good.raw, 2061typerun_good.raw, 0603typerun_good.raw

It will always start with a 4 digit number, but it could be any number between 0001 to 9999. Other filenames start with letters, which I can do, but unable to figure out how to find files that start with numbers with a given range.

Thanks,
AC
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2AnthonyCian

try regex search: ^\d\d\d\d[A-Za-z]
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Or just ^\d\d\d\d (which equals to ^\d{4}) to find names starting with 4 digits.
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2MVV
With your expression names starting with 5,6,7 and so on digits also will be found ... TS wants only 4 digits. Better - ^\d{4}\D
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Ovg wrote:Better - ^\d{4}\D
You're right!
User avatar
AnthonyCian
Senior Member
Senior Member
Posts: 265
Joined: 2005-06-16, 01:45 UTC
Location: Thatcher Az. USA

Post by *AnthonyCian »

Thanks MVV and Ovg. These work fine. I favor ^\d{4}\D.
AC
Post Reply