Page 2 of 2

Posted: 2009-08-22, 11:42 UTC
by Balderstrom
multiline searches don't work in TC period.
The file I tested with is 912 bytes, and TC refuses to find a multi-line regex. Whereas a dinky 132kb application grep.exe does so happily.

AFAIK the whole file doesn't need to be in memory to search it for multi-line, you flag partial matches and continue scanning the file until the partial match becomes a complete match or no match.

Posted: 2009-08-23, 15:45 UTC
by Postkutscher
white wrote:
Balderstrom wrote:Why wouldn't a regex search of:
.*(Alpha.*Bravo|Bravo.*Alpha).* work?
Because Total Commander does a line by line search and "Alpha" and "Bravo" may be on different lines.
Fortunately this was not a problem in my case, but I have UTF8 encoded files, so regex could not be used anyway. I tried to manually translate my keywords into 1251 ANSI codepage and then apply for search, but it doesn`t work. Aside of this it takes about 6 hours for a 100 MB directory with 100% load on one of two processor cores.

Posted: 2009-08-23, 21:16 UTC
by white
Postkutscher wrote:
white wrote:
Balderstrom wrote:Why wouldn't a regex search of:
.*(Alpha.*Bravo|Bravo.*Alpha).* work?
Because Total Commander does a line by line search and "Alpha" and "Bravo" may be on different lines.
Fortunately this was not a problem in my case, but I have UTF8 encoded files, so regex could not be used anyway. I tried to manually translate my keywords into 1251 ANSI codepage and then apply for search, but it doesn`t work. Aside of this it takes about 6 hours for a 100 MB directory with 100% load on one of two processor cores.
Try searching for the binary (utf8) codes of your keywords and remove the leading and trailing ".*" because that is very inefficient.

A regex search of:
\x41\x6c\x70\x68\x61.*\x42\x72\x61\x76\x6F|\x42\x72\x61\x76\x6F.*\x41\x6c\x70\x68\x61

is the same as a regex search of:
Alpha.*Bravo|Bravo.*Alpha

Posted: 2009-08-23, 21:51 UTC
by Postkutscher
2white
Thank you for the tip, I will try it tomorrow.

But I still think it is not so handy to make such a regexps for the simpliest search. It must be improved.

Moderators, could you please move this thread to suggestions?

Posted: 2009-08-23, 23:24 UTC
by Hacker
[mod]Moved to the Suggestions forum.

Hacker (Moderator)[/mod]

Posted: 2009-08-24, 22:43 UTC
by Postkutscher
2Hacker, thanks.

2white
Your tip speeds up the search a lot, thank you.

But as I can see, it is more efficient to unpack my files manually and to use the regular search twice then. Very uncomfortable :(

Posted: 2009-08-25, 00:05 UTC
by Balderstrom
AFAICT Grep, et al from UnxUtils aren't any help in these particular cases either -- unless there is some setting I am missing. Everytime I try and use a linux-based tool with anything remotely close to unicode or utf-8 or the like, they fail miserably (even the ones specifically compiled for windows).

On slashdot there's a common meme about When will it be the "year of the linux desktop". To me, that sure as hell isn't gonna happen until linux starts supporting more than basic ansi.