Hi!
I appreciate that Total Commander has some Regex capabilities in various places, but today I run into an issue. I needed to search a pretty deep hierarchy of directories for a files with specific string. There was mix of source and binary files that matched. So I thought I can filter out binaries by just specifying the following regex in "Search in" textbox:
\.(?!dll|exe|cache)$
(look for any file which has a dot NOT FOLLOWED by any of the given extensions).
But it didn't work, it turned out that Total Commander doesn't support so-called "negative lookahead assertions".
So please either help me how can I complete similar tasks in the future, or possibly plan for inclusion of a full blown regex engine in TC. I noticed that basic syntax is (fortunately) similar to the one used by .NET / JavaScript / PCRE (which have the advanced features), so replacing this builtin engine with the one to offer full capabilities would not break anything.
Thanks!
Full-blown Regex engine needed
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 16
- Joined: 2011-11-28, 23:33 UTC
You could utilize the TC NOT operator "|"
Look for any file which has NOT any of the given extensions: dll|exe|cache
Search for: [ |*.dll *.exe *.cache ]
Look for any file with "mystring" in name which has NOT any of the given extensions: dll|exe|cache
Search for: [ *mystring*|*.dll *.exe *.cache ]
Press F1-key while in Find dialog to read more about.
Look for any file which has NOT any of the given extensions: dll|exe|cache
Search for: [ |*.dll *.exe *.cache ]
Look for any file with "mystring" in name which has NOT any of the given extensions: dll|exe|cache
Search for: [ *mystring*|*.dll *.exe *.cache ]
Press F1-key while in Find dialog to read more about.