Bug in Search RegEx ?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
aguirRe
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-06, 17:33 UTC
Contact:

Bug in Search RegEx ?

Post by *aguirRe »

I made a Find Files search for the text "sky[0-9]" with RegEx checked and TC 6.01 found a couple of binary files, no problem with that. Then I pressed F3 (still in Find Files) on one of the files and then F3 again for finding the precise match in the file but TC reported "Not found". Weird ...

Checking one of the other files (F3 - F3) and then it was OK, TC found the spot in the file. Going back to the first file, tried again but TC still said "Not found". I then pressed F7 to change the search text to just "sky" and unchecked the RegEx box. Now TC found the spot in the file, a text "sky1".

Really confused, I changed the search text back to "sky[0-9]" and checked RegEx. Now TC reported "Not found" again.

I'm not a RegEx expert, but I believe there is something wrong here ...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I guess that the display mode in lister for that file doesn't support regex, or the line in which the string appears is too long.
Author of Total Commander
https://www.ghisler.com
aguirRe
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-06, 17:33 UTC
Contact:

Post by *aguirRe »

Well, it was the same (and default) display mode for both files (which were binary) and TC could only find the text in one of them. Since they were binary files, I can't see how the "line length" is of any relevance here.

The bottom line is, TC could find the RegEx text while searching in the Find Files operation, but the same RegEx expression in Lister didn't always work even if the text definitely was there. That is a bit disturbing.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

I can't see how the "line length" is of any relevance here.
TC's RegEx can only work stringwise, where the string is taken as a line of a 4KB maximum length. The problem arises, when there are not enough CR/LFs in a binary file to satisfy the max. 4KB chunks requirement.

HTH
Roman
Post Reply