Question regarding search (ALT+F7 "Find Files")...

English support forum

Moderators: Hacker, petermad, Stefan2, white

Leo
Junior Member
Junior Member
Posts: 12
Joined: 2003-02-14, 07:46 UTC

Question regarding search (ALT+F7 "Find Files")...

Post by *Leo »

Hi all,

Is there possibility that Christian would add advanced search options in
search (ALT+F7 "Find Files")?

Under this I mean the introduction of logical operators (AND, OR, NOT) and
some others (like NEAR)?


Explanation:

I you like to search all my ".txt" files that contain, for example, words
"park", "walk", "tree".


Also, is there some other 3rd party program (or even better "Total Commander"
plug-in) that can do this?


Thanks in advance for your comments/help!


Leo
User avatar
norfie
Power Member
Power Member
Posts: 1194
Joined: 2003-02-18, 14:18 UTC

Post by *norfie »

Last edited by norfie on 2004-09-10, 20:40 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Now that it works, I can tell you: TC 6.0 will support regular expressions as an option! It already works in search, multi-rename tool and select/unselect files. However, it will not be supported for text searches yet.
Author of Total Commander
https://www.ghisler.com
User avatar
soreno
Junior Member
Junior Member
Posts: 87
Joined: 2003-02-13, 13:04 UTC
Location: Denmark

Post by *soreno »

I'm looking forward to TC 6.0 !
Regular expressions are pretty usefull - if you know how to create them.. :-)

What library are you using (or have you created your own.. :shock: ) ?
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

OMG, regex, I must be dreaming, no I cann't be, I must. Damn, regex! Does that mean that we can still hope for search in background :P At last!

Cheers.
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 05-06-2003 21:37:41 +0000 ghisler(Author) wrote:

g> TC 6.0 will support regular expressions as an option!

I'll be damn... I really need to have a drink now... %) I JUST CAN'T BELIEVE!!!
OK, I'm drinking Martini from a bottle. Your health, Christian!
Damn, just can't believe... You are the best, Mr. Ghisler.[/face]
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

ghisler(Author) wrote:TC 6.0 will support regular expressions as an option!
Thanks! That is a very useful, long awaited improvement. :D
soreno wrote:What library are you using (or have you created your own.. :shock: ) ?
I would like to kown that too for different reasons. One is that the library eventually affects the possibilites offered to the user.
(I like boost regex. It is a free C++ library.)
User avatar
havanna
Member
Member
Posts: 163
Joined: 2003-02-27, 08:06 UTC
Location: Baden/Württemberg

Yipppeeeeeh!

Post by *havanna »

For me too, please. When will it come? :D
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Re: Yipppeeeeeh!

Post by *pdavit »

havanna wrote:For me too, please. When will it come? :D
Rumors say this autumn and close to September-October! ;)
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

What library are you using (or have you created your own.. icon_eek.gif ) ?
I'm using this one:

http://anso.virtualave.net/

The advantage is that it's free also for commercial use, so no problem to add to my software. I also had no problems to build it with Delphi 2.0, and it seems to be fast too.

Btw, what do you think, should regular expressions be case sensitive or insensitive by default? I plan to make it configurable, but what should be the default? I ask because file names are case-insensitive on Windows, but regular expressions come from Unix and are therefore usually case-sensitive...

Currently my problem is how to support regex for text searches. A user could define an expression which matches a whole 2 GB file - too large to hold in memory. Any ideas? Would a per line search (limited to, say, 1k lines) be sufficient? And how to handle binary files?
Author of Total Commander
https://www.ghisler.com
User avatar
soreno
Junior Member
Junior Member
Posts: 87
Joined: 2003-02-13, 13:04 UTC
Location: Denmark

Post by *soreno »

It should be case-insensitive by default - with an easy way to switch to case-sensitive.
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

If case sensitivity flag can be saved in .ini file(like other settings), it actually will be default.
I think 2-3 Kb search limit should be enough for most purposes.
I don't see reason why regular expression search in binary files should be handled in different way? It is just regular :) file.
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

About memory management, a good choice is to let the user define memory size (say as a parameter in the ini) otherwise set a default of ~2k which should be enough, btw why in lines?; bytes seem to be more appropriate (hmm I smell problems with UTF). [it definitely should be customizable]

Case sensitivity is probably a choice for you to make; that is choosing case insensitive would let it become a more laymen oriented while advanced user can play with the flag as they see fit, this flag however should be specified as a checkbox (on the search screen) and as a parameter in the expression itself which can override default or current settings which would help immensely with saving searches.

Binary files shouldn't be any different than normal files.

BTW adding a replace with regex in text files seems a very natural extension and badly needed if you already let users search.

THANKS for the long awaited regex!!!!!!

Cheers.
User avatar
Gorbush
Junior Member
Junior Member
Posts: 33
Joined: 2003-02-05, 12:09 UTC
Location: Kharkiv, Ukraine

Post by *Gorbush »

Other way - you can implement regexp multiline searches incrementally, but with partially overloading. i mean - by first you search in block of text lines
1111111
2222222
3333333
4444444
, then you search in lines
3333333
4444444
5555555
6666666
.....
an so on....
Of course, this search is only for multi-line searches....
Puljajev Sergej aka Gorbush
[Russian Total Commander Plugring Team]
User avatar
Gorbush
Junior Member
Junior Member
Posts: 33
Joined: 2003-02-05, 12:09 UTC
Location: Kharkiv, Ukraine

Post by *Gorbush »

And other - will you implement regexp searches in the same thread - or other?
Sometimes is hard regular expressions it may hung or get in loop, so it need to be a some "canceller"....
Puljajev Sergej aka Gorbush
[Russian Total Commander Plugring Team]
Post Reply