+Regexp don't works in some dialogs

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

converting RegEx expression to lowercase?
That's the difficult part, because it requires complete parsing of the regular expression.
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 »

MarcinW wrote:
ghisler(Author) wrote:Users can make case-sensitive searches with RegEx. This could have the bad effect that a file is only found on one side when it has different case on the other side...
What about converting all filenames (internally) to lowercase, and also converting RegEx expression to lowercase?
ghisler(Author) wrote:
converting RegEx expression to lowercase?
That's the difficult part, because it requires complete parsing of the regular expression.
No it doesn't. But I think the user should be warned that a case sensitive filter is not supported. Same for defined searches when support for this is added.

To check if a regular expression contains a modifier setting that turns off case insensitivity shouldn't be that hard when using a regular expression ;-)

Code: Select all

(^|[^\\])\(\?[^-)]*-[^)]*i[^)]*\)
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It is easier to check both names if they have different cases. If (is_regex) and (left is not matched) and (lstrcmp(left, right)<>0) then check regex for right. It is also faster than additional regex.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2MVV
Sorry, that's not how it works: TC first reads the complete left side, then the complete right side. The filter is applied separately while reading each side - this is much faster because TC has to deal with a much smaller list (only the matching files are added to the list).
Author of Total Commander
https://www.ghisler.com
Post Reply