Page 1 of 2

Force exact matches doesn't work

Posted: 11 Nov 2013 11:12
by LittleBiG
The help file:
To force exact matches (as opposed to loose matches) you can quote a filter. If you state multiple filters then each filter that should be matched exactly should be quoted.
The reality:

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:15
by binocular222
You misunderstood the help file.
Quote is used to force exact match on space character, so:
"Read me" should not match Readme.txt
Read me (without quote) should match every file with "Read" and "me" in any position

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:33
by LittleBiG
binocular222 wrote:You misunderstood the help file.
Quote is used to force exact match on space character, so:
"Read me" should not match Readme.txt
Read me (without quote) should match every file with "Read" and "me" in any position
I think you are not right. Read me without quote means *read me*. "read me" should mean the file called read me, without any extension.

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:33
by armsys
binocular222's reply is factually correct.
But now we have a problem: How to exclude "This is a readme.txt*" from the search result?

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:36
by Marco
Regex:

Code: Select all

>^readme\.txt$

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:37
by LittleBiG
Maybe I am "wired" wrongly, but this is exactly in the help file. There is no mention about you wrote.
Matches

Loose matches are supported, i.e. wildcards are auto-added on both ends if no wildcards are passed with the pattern. For example, to show all items containing the letter "e" in the name simply state "e" as filter:

e -> show all files containing "e" in the name

To force exact matches (as opposed to loose matches) you can quote a filter. If you state multiple filters then each filter that should be matched exactly should be quoted.

"readme.txt"|"setup.txt" -> show only files readme.txt and setup.txt

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:38
by binocular222
Read me without quote will match "me Read". I tested this.
@armsys: Exclamation mark will invert the result (aka NOT)

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:40
by LittleBiG
Marco wrote:Regex:

Code: Select all

>^readme\.txt$
Wrong. It matches to this for example: Readme.txt22.txt

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:41
by armsys
LittleBiG wrote:Maybe I am "wired" wrongly, but this is exactly in the help file.
See: http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=10543

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:43
by Marco
LittleBiG wrote:
Marco wrote:Regex:

Code: Select all

>^readme\.txt$
Wrong. It matches to this for example: Readme.txt22.txt
I added the dollar sign in the original post, with that it works, tested.

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:44
by LittleBiG
armsys wrote:
LittleBiG wrote:Maybe I am "wired" wrongly, but this is exactly in the help file.
See: http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=10543
About the QNS? I am talking about Visual filter.

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:48
by binocular222
ah, the Visual Filter.
Then you cannot quote. Quotes are treat as literal search term. This bugs me for a while.

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:51
by armsys
Hi LittleBig,
In the address bar, Marco's regex works:

Code: Select all

C:\Temp\?>^readme\.txt$
That's, it finds Readme.txt only, not Readme.txt22.txt. :appl:
Thanks Marco.

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:53
by LittleBiG
Marco wrote:
LittleBiG wrote:
Marco wrote:Regex:

Code: Select all

>^readme\.txt$
Wrong. It matches to this for example: Readme.txt22.txt
I added the dollar sign in the original post, with that it works, tested.
Yes, it is better now. But it is not an answer to my original question. Why doesn't it work as advertised in the help file? (without regex).

Re: Force exact matches doesn't work

Posted: 11 Nov 2013 11:54
by Marco
armsys wrote:Thanks Marco.
You're welcome :D