[TC6] RegEx bug

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Thany
Senior Member
Senior Member
Posts: 293
Joined: 2003-09-30, 09:20 UTC
Location: Netherlands

[TC6] RegEx bug

Post by *Thany »

I'm trying to search for files using a regular expression. As a programmer, I'm one of the lucky few who know how to create regexes. I use this one:

Code: Select all

[a-z]{3,4}[0-9]{2}[a-z][0-9]{3}\.jpg
This expression should return files like "asam04a100.jpg" or "gre00c550.jpg", but it doesn't return any file (while in the directory I'm search, there are literally thousands of those files). TC6 also is remarkebly fast with its decision. I mean, in a directory with about 27,500 files it's simply impossible to search using this expression in a fraction of a second.

Maybe TC6 is lacking in support of some part of the expression? Maybe the { and } brackets?
Thany
Senior Member
Senior Member
Posts: 293
Joined: 2003-09-30, 09:20 UTC
Location: Netherlands

Post by *Thany »

Never mind... One more look at the search window and the "RegEx" checkbox caught my eye :oops:

I was thinking it automatically detected whether a search string is a regex or not...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No it isn't, because most of the above characters (except for the backslash) can appear in normal file names too! But there is a shortcut: Type a < (smaller than) sign as the first character to turn on regular expressions!
Author of Total Commander
https://www.ghisler.com
Thany
Senior Member
Senior Member
Posts: 293
Joined: 2003-09-30, 09:20 UTC
Location: Netherlands

Post by *Thany »

That's good to know :)

Also, I don't think the check in the "RegEx" checkbox is remembered... so I made the same mistake with my second search command :)
Post Reply