Search with RegEx - initialization error

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 4596
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Search with RegEx - initialization error

Post by *white »

* Start Find Files
* Search for nothing
* Enable RegEx
* Click Start search
* No files are found (shouldn't it find all files?)

Close Find Files dialog and then:
* Start Find Files
* Search for "aa"
* Enable RegEx
* Click Start search
* All files containing "aa" are found
* Do not close the dialog
* Search for nothing
(* RegEx still is enabled)
* Click Start search
* All files containing "aa" are found while searching for an empty regular expression
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will check that, thanks.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4596
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

I found an interesting discussion about what an empty regular expression means at:
http://www.nntp.perl.org/group/perl.perl5.porters/2006/12/msg119324.html

A small quote from that discussion:
This is actually documented behaviour. The empty pattern when used in
a m// or s/// match operator is special cased to mean the pattern used
in the last successful match.
User avatar
white
Power Member
Power Member
Posts: 4596
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Fixed OK.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
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