regex search line limit
Moderators: Hacker, petermad, Stefan2, white
regex search line limit
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.
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.
More than 14 round bracket pairs are not supported. See:
http://ghisler.ch/board/viewtopic.php?t=28562
I agree it isn't clear.
http://ghisler.ch/board/viewtopic.php?t=28562
I agree it isn't clear.
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!"
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!"
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: