regex search line limit

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
isidro
Junior Member
Junior Member
Posts: 96
Joined: 2006-03-21, 04:39 UTC
Location: argentina

regex search line limit

Post by *isidro »

I'm searching for deleting unwanted languages, in some cases search line isn't parsed with no error or warning (ie: line too long/complex)

This works:
\.bg($|\..+)|\.br($|\..+)|\.by($|\..+)|\.ca($|\..+)|\.cs($|\..+)|\.cz($|\..+)|\.de($|\..+)|\.eu($|\..+)|\.fi($|\..+)|\.fr($|\..+)|\.he($|\..+)|\.hu($|\..+)|\.hy($|\..+)|\.it($|\..+)

Correctly finds:
ffdshow.1031.de
mpcresources.de.dll

It stops finding those same files if you add one or more languages to the previous example ie: |\.ja($|\..+)|\.ko($|\..+)|\.kr($|\..+)|\.nl($|\..+)|\.pl($|\..+)|\.ru($|\..+)|\.sc($|\..+)|\.se($|\..+)|\.sk($|\..+)|\.sv($|\..+)|\.tc($|\..+)|\.tr($|\..+)|\.ua($|\..+)

So now I'm doing a lot of partial searches, but it's difficult to know if there are no results because line is too complex or because there are no matches.
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

More than 14 round bracket pairs are not supported. See:
http://ghisler.ch/board/viewtopic.php?t=28562

I agree it isn't clear.
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Maximum is raised to 31 round bracket pairs in TC 8.50beta. See mentioned thread.

Tested TC 8.50b6 32bit. Searched for file names (Alt+F7) using RegEx.

Searched for "()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()" in "c:\"
Result: All files and folders found

Searched for "()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()" in "c:\"
Result: TC searches the whole hard drive and finds nothing.

Suggestion: Abort search in case of a regex error and report the error, for example: "[No files found] - RegEx error!"
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Tested TC 8.50b8 32bit.

An error is shown when there is an error in the regular expression. Works OK when searching file names or when searching text in files. Does not work when doing a regex search on the Plugins tab. 2ghisler(Author): Can you also add it to the Plugins tab?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently it's only implemented in the "search name" and "search text" fields. I can add it to other locations too if this is wished.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:Currently it's only implemented in the "search name" and "search text" fields. I can add it to other locations too if this is wished.
Yes, please.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I will add it to the next beta.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Test OK using TC 8.50b10 32bit.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply