Regular Expression for file names formatted: YYMMDD_HHMMSS

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
prischbeck
Junior Member
Junior Member
Posts: 2
Joined: 2017-06-06, 20:49 UTC

Regular Expression for file names formatted: YYMMDD_HHMMSS

Post by *prischbeck »

Dear all,

I have a long list with files named like: Spec_130515_115635.57

I want to select files in e.g. the interval from

Spec_130515_115635.57

to

Spec_130515_115641.57

In the search function of the software Total Commander I use the regular expression:

[Spec_130515_115635.57 - Spec_130515_115641.57]

The result is a list of all files in the folder, not only the wished interval. Please write me, how I can receive the correct result?

Thank you very much!

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

Post by *Ovg »

Try Spec_130515_1156(3[5-9]|4[0-1]).57
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
prischbeck
Junior Member
Junior Member
Posts: 2
Joined: 2017-06-06, 20:49 UTC

Post by *prischbeck »

Dear Ovg,

thanks a lot!

It works with a small modification:

Spec_130515_1156(3[5-9]|4[0-1]).(17|37|57|76|96)

Best regards,
Pablo Max
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

You are welcome!

You didn't mention about 17, 37, 76, 96, otherwise I would write right RegEx :mrgreen:
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
Post Reply